@wangeditor-next/editor 5.6.53 → 5.6.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var e,t,n,r,o,i,a,s,u,l,c,d,f,p,h,g,v,m,y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function b(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function E(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}function w(){return t?e:(t=1,e=function(e){try{return!!e()}catch(e){return!0}})}function C(){if(r)return n;r=1;var e=w();return n=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}function D(){if(i)return o;i=1;var e=C(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return o=e?r:function(e){return function(){return n.apply(e,arguments)}},o}function A(){if(s)return a;s=1;var e=D(),t=e({}.toString),n=e("".slice);return a=function(e){return n(t(e),8,-1)}}function S(){if(l)return u;l=1;var e=D(),t=w(),n=A(),r=Object,o=e("".split);return u=t(function(){return!r("z").propertyIsEnumerable(0)})?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function O(){return d?c:(d=1,c=function(e){return null==e})}function x(){if(p)return f;p=1;var e=O(),t=TypeError;return f=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function N(){if(g)return h;g=1;var e=S(),t=x();return h=function(n){return e(t(n))}}function B(){if(m)return v;m=1;var e=function(e){return e&&e.Math===Math&&e};return v=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof y&&y)||e("object"==typeof v&&v)||function(){return this}()||Function("return this")()}var T,k,F,I,P,R,_,L,M,j,H,z,$,U,V,W,G,q,K,Y,X,Z,J,Q,ee,te,ne,re,oe,ie={exports:{}};function ae(){return k?T:(k=1,T=!1)}function se(){if(I)return F;I=1;var e=B(),t=Object.defineProperty;return F=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function ue(){if(P)return ie.exports;P=1;var e=ae(),t=B(),n=se(),r="__core-js_shared__",o=ie.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.49.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),ie.exports}function le(){if(_)return R;_=1;var e=ue();return R=function(t,n){return e[t]||(e[t]=n||{})}}function ce(){if(M)return L;M=1;var e=x(),t=Object;return L=function(n){return t(e(n))}}function de(){if(H)return j;H=1;var e=D(),t=ce(),n=e({}.hasOwnProperty);return j=Object.hasOwn||function(e,r){return n(t(e),r)}}function fe(){if($)return z;$=1;var e=D(),t=0,n=Math.random(),r=e(1.1.toString);return z=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function pe(){if(G)return W;G=1;var e,t,n=B(),r=function(){if(V)return U;V=1;var e=B().navigator,t=e&&e.userAgent;return U=t?String(t):""}(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(t=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&r&&(!(e=r.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1]),W=t}function he(){if(K)return q;K=1;var e=pe(),t=w(),n=B().String;return q=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),q}function ge(){if(X)return Y;X=1;var e=he();return Y=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function ve(){if(J)return Z;J=1;var e=B(),t=le(),n=de(),r=fe(),o=he(),i=ge(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return Z=function(e){return n(s,e)||(s[e]=o&&n(a,e)?a[e]:u("Symbol."+e)),s[e]}}function me(){if(ee)return Q;ee=1;var e="object"==typeof document&&document.all;return Q=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function ye(){if(ne)return te;ne=1;var e=me();return te=function(t){return"object"==typeof t?null!==t:e(t)}}function be(){if(oe)return re;oe=1;var e=ye(),t=String,n=TypeError;return re=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}var Ee,we,Ce,De,Ae={};function Se(){if(we)return Ee;we=1;var e=w();return Ee=!e(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function Oe(){if(De)return Ce;De=1;var e=Se(),t=w();return Ce=e&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}var xe,Ne,Be,Te,ke,Fe,Ie,Pe,Re,_e,Le,Me,je,He,ze,$e,Ue,Ve,We,Ge,qe,Ke,Ye,Xe,Ze,Je,Qe,et,tt,nt,rt,ot,it,at,st,ut,lt,ct,dt,ft,pt,ht,gt,vt,mt,yt,bt,Et,wt,Ct,Dt,At,St,Ot,xt,Nt,Bt,Tt,kt,Ft,It,Pt,Rt,_t,Lt={};function Mt(){if(Ne)return xe;Ne=1;var e=B(),t=ye(),n=e.document,r=t(n)&&t(n.createElement);return xe=function(e){return r?n.createElement(e):{}}}function jt(){if(Te)return Be;Te=1;var e=Se(),t=w(),n=Mt();return Be=!e&&!t(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function Ht(){if(Fe)return ke;Fe=1;var e=C(),t=Function.prototype.call;return ke=e?t.bind(t):function(){return t.apply(t,arguments)},ke}function zt(){if(Pe)return Ie;Pe=1;var e=B(),t=me();return Ie=function(n,r){return arguments.length<2?(o=e[n],t(o)?o:void 0):e[n]&&e[n][r];var o},Ie}function $t(){if(_e)return Re;_e=1;var e=D();return Re=e({}.isPrototypeOf)}function Ut(){if(Me)return Le;Me=1;var e=zt(),t=me(),n=$t(),r=ge(),o=Object;return Le=r?function(e){return"symbol"==typeof e}:function(r){var i=e("Symbol");return t(i)&&n(i.prototype,o(r))}}function Vt(){if(He)return je;He=1;var e=String;return je=function(t){try{return e(t)}catch(e){return"Object"}}}function Wt(){if($e)return ze;$e=1;var e=me(),t=Vt(),n=TypeError;return ze=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function Gt(){if(Ve)return Ue;Ve=1;var e=Wt(),t=O();return Ue=function(n,r){var o=n[r];return t(o)?void 0:e(o)},Ue}function qt(){if(Ke)return qe;Ke=1;var e=Ht(),t=ye(),n=Ut(),r=Gt(),o=function(){if(Ge)return We;Ge=1;var e=Ht(),t=me(),n=ye(),r=TypeError;return We=function(o,i){var a,s;if("string"===i&&t(a=o.toString)&&!n(s=e(a,o)))return s;if(t(a=o.valueOf)&&!n(s=e(a,o)))return s;if("string"!==i&&t(a=o.toString)&&!n(s=e(a,o)))return s;throw new r("Can't convert object to primitive value")},We}(),i=ve(),a=TypeError,s=i("toPrimitive");return qe=function(i,u){if(!t(i)||n(i))return i;var l,c=r(i,s);if(c){if(void 0===u&&(u="default"),l=e(c,i,u),!t(l)||n(l))return l;throw new a("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(i,u)}}function Kt(){if(Xe)return Ye;Xe=1;var e=qt(),t=Ut();return Ye=function(n){var r=e(n,"string");return t(r)?r:r+""}}function Yt(){if(Ze)return Lt;Ze=1;var e=Se(),t=jt(),n=Oe(),r=be(),o=Kt(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Lt.f=e?n?function(e,t,n){if(r(e),t=o(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var i=s(e,t);i&&i[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(e,t,n)}:a:function(e,n,s){if(r(e),n=o(n),r(s),t)try{return a(e,n,s)}catch(e){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(e[n]=s.value),e},Lt}function Xt(){if(tt)return et;tt=1;var e=function(){if(Qe)return Je;Qe=1;var e=Math.ceil,t=Math.floor;return Je=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Je}();return et=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function Zt(){if(it)return ot;it=1;var e=Xt(),t=Math.min;return ot=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function Jt(){if(st)return at;st=1;var e=Zt();return at=function(t){return e(t.length)}}function Qt(){if(lt)return ut;lt=1;var e=N(),t=function(){if(rt)return nt;rt=1;var e=Xt(),t=Math.max,n=Math.min;return nt=function(r,o){var i=e(r);return i<0?t(i+o,0):n(i,o)},nt}(),n=Jt(),r=function(r){return function(o,i,a){var s=e(o),u=n(s);if(0===u)return!r&&-1;var l,c=t(a,u);if(r&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((r||c in s)&&s[c]===i)return r||c||0;return!r&&-1}};return ut={includes:r(!0),indexOf:r(!1)}}function en(){return dt?ct:(dt=1,ct={})}function tn(){if(pt)return ft;pt=1;var e=D(),t=de(),n=N(),r=Qt().indexOf,o=en(),i=e([].push);return ft=function(e,a){var s,u=n(e),l=0,c=[];for(s in u)!t(o,s)&&t(u,s)&&i(c,s);for(;a.length>l;)t(u,s=a[l++])&&(~r(c,s)||i(c,s));return c},ft}function nn(){return gt?ht:(gt=1,ht=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function rn(){if(yt)return Ae;yt=1;var e=Se(),t=Oe(),n=Yt(),r=be(),o=N(),i=function(){if(mt)return vt;mt=1;var e=tn(),t=nn();return vt=Object.keys||function(n){return e(n,t)},vt}();return Ae.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)n.f(e,a=u[c++],s[a]);return e},Ae}function on(){if(Ct)return wt;Ct=1;var e=le(),t=fe(),n=e("keys");return wt=function(e){return n[e]||(n[e]=t(e))}}function an(){if(At)return Dt;At=1;var e,t=be(),n=rn(),r=nn(),o=en(),i=function(){if(Et)return bt;Et=1;var e=zt();return bt=e("document","documentElement")}(),a=Mt(),s=on(),u="prototype",l="script",c=s("IE_PROTO"),d=function(){},f=function(e){return"<"+l+">"+e+"</"+l+">"},p=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;h="undefined"!=typeof document?document.domain&&e?p(e):(n=a("iframe"),o="java"+l+":",n.style.display="none",i.appendChild(n),n.src=String(o),(t=n.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):p(e);for(var s=r.length;s--;)delete h[u][r[s]];return h()};return o[c]=!0,Dt=Object.create||function(e,r){var o;return null!==e?(d[u]=t(e),o=new d,d[u]=null,o[c]=e):o=h(),void 0===r?o:n.f(o,r)},Dt}function sn(){return Nt?xt:(Nt=1,xt={})}function un(){return Ft?kt:(Ft=1,kt=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function ln(){if(Pt)return It;Pt=1;var e=Se(),t=Yt(),n=un();return It=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}function cn(){if(_t)return Rt;_t=1;var e,t,n,r=function(){if(Tt)return Bt;Tt=1;var e=B(),t=me(),n=e.WeakMap;return Bt=t(n)&&/native code/.test(String(n))}(),o=B(),i=ye(),a=ln(),s=de(),u=ue(),l=on(),c=en(),d="Object already initialized",f=o.TypeError,p=o.WeakMap;if(r||u.state){var h=u.state||(u.state=new p);h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new f(d);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var g=l("state");c[g]=!0,e=function(e,t){if(s(e,g))throw new f(d);return t.facade=e,a(e,g,t),t},t=function(e){return s(e,g)?e[g]:{}},n=function(e){return s(e,g)}}return Rt={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!i(n)||(r=t(n)).type!==e)throw new f("Incompatible receiver, "+e+" required");return r}}}}var dn,fn,pn={},hn={};function gn(){if(fn)return pn;fn=1;var e=Se(),t=Ht(),n=function(){if(dn)return hn;dn=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return hn.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,hn}(),r=un(),o=N(),i=Kt(),a=de(),s=jt(),u=Object.getOwnPropertyDescriptor;return pn.f=e?u:function(e,l){if(e=o(e),l=i(l),s)try{return u(e,l)}catch(e){}if(a(e,l))return r(!t(n.f,e,l),e[l])},pn}var vn,mn,yn,bn,En,wn,Cn,Dn={exports:{}};function An(){if(mn)return vn;mn=1;var e=Se(),t=de(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,o=t(n,"name"),i=o&&"something"===function(){}.name,a=o&&(!e||e&&r(n,"name").configurable);return vn={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function Sn(){if(bn)return yn;bn=1;var e=D(),t=me(),n=ue(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),yn=n.inspectSource}function On(){if(En)return Dn.exports;En=1;var e=D(),t=w(),n=me(),r=de(),o=Se(),i=An().CONFIGURABLE,a=Sn(),s=cn(),u=s.enforce,l=s.get,c=String,d=Object.defineProperty,f=e("".slice),p=e("".replace),h=e([].join),g=o&&!t(function(){return 8!==d(function(){},"length",{value:8}).length}),v=String(String).split("String"),m=Dn.exports=function(e,t,n){"Symbol("===f(c(t),0,7)&&(t="["+p(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!r(e,"name")||i&&e.name!==t)&&(o?d(e,"name",{value:t,configurable:!0}):e.name=t),g&&n&&r(n,"arity")&&e.length!==n.arity&&d(e,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?o&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var a=u(e);return r(a,"source")||(a.source=h(v,"string"==typeof t?t:"")),e};return Function.prototype.toString=m(function(){return n(this)&&l(this).source||a(this)},"toString"),Dn.exports}function xn(){if(Cn)return wn;Cn=1;var e=me(),t=Yt(),n=On(),r=se();return wn=function(o,i,a,s){s||(s={});var u=s.enumerable,l=void 0!==s.name?s.name:i;if(e(a)&&n(a,l,s),s.global)u?o[i]=a:r(i,a);else{try{s.unsafe?o[i]&&(u=!0):delete o[i]}catch(e){}u?o[i]=a:t.f(o,i,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return o},wn}var Nn,Bn={};var Tn,kn,Fn,In,Pn,Rn,_n,Ln,Mn,jn,Hn,zn,$n,Un,Vn,Wn,Gn,qn,Kn,Yn,Xn,Zn,Jn,Qn,er,tr,nr,rr,or,ir,ar,sr,ur,lr={};function cr(){if(Fn)return kn;Fn=1;var e=zt(),t=D(),n=function(){if(Nn)return Bn;Nn=1;var e=tn(),t=nn().concat("length","prototype");return Bn.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Bn}(),r=(Tn||(Tn=1,lr.f=Object.getOwnPropertySymbols),lr),o=be(),i=t([].concat);return kn=e("Reflect","ownKeys")||function(e){var t=n.f(o(e)),a=r.f;return a?i(t,a(e)):t},kn}function dr(){if(Pn)return In;Pn=1;var e=de(),t=cr(),n=gn(),r=Yt();return In=function(o,i,a){for(var s=t(i),u=r.f,l=n.f,c=0;c<s.length;c++){var d=s[c];e(o,d)||a&&e(a,d)||u(o,d,l(i,d))}},In}function fr(){if(Mn)return Ln;Mn=1;var e=B(),t=gn().f,n=ln(),r=xn(),o=se(),i=dr(),a=function(){if(_n)return Rn;_n=1;var e=w(),t=me(),n=/#|\.prototype\./,r=function(n,r){var u=i[o(n)];return u===s||u!==a&&(t(r)?e(r):!!r)},o=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return Rn=r}();return Ln=function(s,u){var l,c,d,f,p,h=s.target,g=s.global,v=s.stat;if(l=g?e:v?e[h]||o(h,{}):e[h]&&e[h].prototype)for(c in u){if(f=u[c],d=s.dontCallGetSet?(p=t(l,c))&&p.value:l[c],!a(g?c:h+(v?".":"#")+c,s.forced)&&void 0!==d){if(typeof f==typeof d)continue;i(f,d)}(s.sham||d&&d.sham)&&n(f,"sham",!0),r(l,c,f,s)}}}function pr(){if($n)return zn;$n=1;var e=de(),t=me(),n=ce(),r=on(),o=function(){if(Hn)return jn;Hn=1;var e=w();return jn=!e(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),jn}(),i=r("IE_PROTO"),a=Object,s=a.prototype;return zn=o?a.getPrototypeOf:function(r){var o=n(r);if(e(o,i))return o[i];var u=o.constructor;return t(u)&&o instanceof u?u.prototype:o instanceof a?s:null},zn}function hr(){if(Vn)return Un;Vn=1;var e,t,n,r=w(),o=me(),i=ye(),a=an(),s=pr(),u=xn(),l=ve(),c=ae(),d=l("iterator"),f=!1;return[].keys&&("next"in(n=[].keys())?(t=s(s(n)))!==Object.prototype&&(e=t):f=!0),!i(e)||r(function(){var t={};return e[d].call(t)!==t})?e={}:c&&(e=a(e)),o(e[d])||u(e,d,function(){return this}),Un={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function gr(){if(Gn)return Wn;Gn=1;var e=Yt().f,t=de(),n=ve()("toStringTag");return Wn=function(r,o,i){r&&!i&&(r=r.prototype),r&&!t(r,n)&&e(r,n,{configurable:!0,value:o})}}function vr(){if(er)return Qn;er=1;var e=function(){if(Jn)return Zn;Jn=1;var e=ye();return Zn=function(t){return e(t)||null===t}}(),t=String,n=TypeError;return Qn=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function mr(){if(nr)return tr;nr=1;var e=function(){if(Xn)return Yn;Xn=1;var e=D(),t=Wt();return Yn=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}(),t=ye(),n=x(),r=vr();return tr=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,a={};try{(o=e(Object.prototype,"__proto__","set"))(a,[]),i=a instanceof Array}catch(e){}return function(e,a){return n(e),r(a),t(e)?(i?o(e,a):e.__proto__=a,e):e}}():void 0),tr}function yr(){if(or)return rr;or=1;var e=fr(),t=Ht(),n=ae(),r=An(),o=me(),i=function(){if(Kn)return qn;Kn=1;var e=hr().IteratorPrototype,t=an(),n=un(),r=gr(),o=sn(),i=function(){return this};return qn=function(a,s,u,l){var c=s+" Iterator";return a.prototype=t(e,{next:n(+!l,u)}),r(a,c,!1,!0),o[c]=i,a},qn}(),a=pr(),s=mr(),u=gr(),l=ln(),c=xn(),d=ve(),f=sn(),p=hr(),h=r.PROPER,g=r.CONFIGURABLE,v=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,y=d("iterator"),b="keys",E="values",w="entries",C=function(){return this};return rr=function(r,d,p,D,A,S,O){i(p,d,D);var x,N,B,T=function(e){if(e===A&&R)return R;if(!m&&e&&e in I)return I[e];switch(e){case b:case E:case w:return function(){return new p(this,e)}}return function(){return new p(this)}},k=d+" Iterator",F=!1,I=r.prototype,P=I[y]||I["@@iterator"]||A&&I[A],R=!m&&P||T(A),_="Array"===d&&I.entries||P;if(_&&(x=a(_.call(new r)))!==Object.prototype&&x.next&&(n||a(x)===v||(s?s(x,v):o(x[y])||c(x,y,C)),u(x,k,!0,!0),n&&(f[k]=C)),h&&A===E&&P&&P.name!==E&&(!n&&g?l(I,"name",E):(F=!0,R=function(){return t(P,this)})),A)if(N={values:T(E),keys:S?R:T(b),entries:T(w)},O)for(B in N)(m||F||!(B in I))&&c(I,B,N[B]);else e({target:d,proto:!0,forced:m||F},N);return n&&!O||I[y]===R||c(I,y,R,{name:A}),f[d]=R,N},rr}function br(){return ar?ir:(ar=1,ir=function(e,t){return{value:e,done:t}})}function Er(){if(ur)return sr;ur=1;var e=N(),t=function(){if(Ot)return St;Ot=1;var e=ve(),t=an(),n=Yt().f,r=e("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:t(null)}),St=function(e){o[r][e]=!0}}(),n=sn(),r=cn(),o=Yt().f,i=yr(),a=br(),s=ae(),u=Se(),l="Array Iterator",c=r.set,d=r.getterFor(l);sr=i(Array,"Array",function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(n,!1);case"values":return a(t[n],!1)}return a([n,t[n]],!1)},"values");var f=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}return sr}Er();var wr,Cr,Dr,Ar,Sr,Or,xr,Nr={};function Br(){if(Cr)return wr;Cr=1;var e={};return e[ve()("toStringTag")]="z",wr="[object z]"===String(e)}function Tr(){if(Ar)return Dr;Ar=1;var e=Br(),t=me(),n=A(),r=ve()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return Dr=e?n:function(e){var a,s,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(a=o(e),r))?s:i?n(a):"Object"===(u=n(a))&&t(a.callee)?"Arguments":u},Dr}!function(){if(xr)return Nr;xr=1;var e=Br(),t=xn(),n=function(){if(Or)return Sr;Or=1;var e=Br(),t=Tr();return Sr=e?{}.toString:function(){return"[object "+t(this)+"]"}}();e||t(Object.prototype,"toString",n,{unsafe:!0})}();var kr,Fr,Ir,Pr,Rr,_r,Lr,Mr,jr,Hr,zr,$r,Ur,Vr={};function Wr(){if(Fr)return kr;Fr=1;var e=Tr(),t=String;return kr=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}function Gr(){if(Pr)return Ir;Pr=1;var e=be();return Ir=function(){var t=e(this),n="";return t.hasIndices&&(n+="d"),t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.dotAll&&(n+="s"),t.unicode&&(n+="u"),t.unicodeSets&&(n+="v"),t.sticky&&(n+="y"),n}}function qr(){if($r)return zr;$r=1;var e,t,n=Ht(),r=D(),o=Wr(),i=Gr(),a=function(){if(_r)return Rr;_r=1;var e=w(),t=B().RegExp,n=e(function(){var e=t("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),r=n||e(function(){return!t("a","y").sticky}),o=n||e(function(){var e=t("^r","gy");return e.lastIndex=2,null!==e.exec("str")});return Rr={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}(),s=le(),u=an(),l=cn().get,c=function(){if(Mr)return Lr;Mr=1;var e=w(),t=B().RegExp;return Lr=e(function(){var e=t(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})}(),d=function(){if(Hr)return jr;Hr=1;var e=w(),t=B().RegExp;return jr=e(function(){var e=t("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})}(),f=s("native-string-replace",String.prototype.replace),p=RegExp.prototype.exec,h=p,g=r("".charAt),v=r("".indexOf),m=r("".replace),y=r("".slice),b=(t=/b*/g,n(p,e=/a/,"a"),n(p,t,"a"),0!==e.lastIndex||0!==t.lastIndex),E=a.BROKEN_CARET,C=void 0!==/()??/.exec("")[1],A=function(e,t){for(var n=e.groups=u(null),r=0;r<t.length;r++){var o=t[r];n[o[0]]=e[o[1]]}};return(b||C||E||c||d)&&(h=function(e){var t,r,a,s=this,u=l(s),c=o(e),d=u.raw;if(d)return d.lastIndex=s.lastIndex,t=n(h,d,c),s.lastIndex=d.lastIndex,t&&u.groups&&A(t,u.groups),t;var w=u.groups,D=E&&s.sticky,S=n(i,s),O=s.source,x=0,N=c;if(D){S=m(S,"y",""),-1===v(S,"g")&&(S+="g"),N=y(c,s.lastIndex);var B=s.lastIndex>0&&g(c,s.lastIndex-1);s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==B&&"\r"!==B&&"\u2028"!==B&&"\u2029"!==B)&&(O="(?: (?:"+O+"))",N=" "+N,x++),r=new RegExp("^(?:"+O+")",S)}C&&(r=new RegExp("^"+O+"$(?!\\s)",S)),b&&(a=s.lastIndex);var T=n(p,D?r:s,N);return D?T?(T.input=c,T[0]=y(T[0],x),T.index=s.lastIndex,s.lastIndex+=T[0].length):s.lastIndex=0:b&&T&&(s.lastIndex=s.global?T.index+T[0].length:a),C&&T&&T.length>1&&n(f,T[0],r,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(T[e]=void 0)}),T&&w&&A(T,w),T}),zr=h}function Kr(){if(Ur)return Vr;Ur=1;var e=fr(),t=qr();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),Vr}Kr();var Yr,Xr,Zr,Jr={};function Qr(){if(Xr)return Yr;Xr=1;var e=D(),t=Xt(),n=Wr(),r=x(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,d=n(r(s)),f=t(u),p=d.length;return f<0||f>=p?e?"":void 0:(l=i(d,f))<55296||l>56319||f+1===p||(c=i(d,f+1))<56320||c>57343?e?o(d,f):l:e?a(d,f,f+2):c-56320+(l-55296<<10)+65536}};return Yr={codeAt:s(!1),charAt:s(!0)}}!function(){if(Zr)return Jr;Zr=1;var e=Qr().charAt,t=Wr(),n=cn(),r=yr(),o=br(),i="String Iterator",a=n.set,s=n.getterFor(i);r(String,"String",function(e){a(this,{type:i,string:t(e),index:0})},function(){var t,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(t=e(r,i),n.index+=t.length,o(t,!1))})}();var eo,to,no,ro,oo,io,ao,so,uo,lo,co,fo={};function po(){if(ro)return no;ro=1;var e=Qr().charAt;return no=function(t,n,r){return n+(r&&e(t,n).length||1)},no}function ho(){if(so)return ao;so=1;var e=Ht(),t=de(),n=$t(),r=function(){if(io)return oo;io=1;var e=B(),t=w(),n=e.RegExp,r=!t(function(){var e=!0;try{n(".","d")}catch(t){e=!1}var t={},r="",o=e?"dgimsy":"gimsy",i=function(e,n){Object.defineProperty(t,e,{get:function(){return r+=n,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in e&&(a.hasIndices="d"),a)i(s,a[s]);return Object.getOwnPropertyDescriptor(n.prototype,"flags").get.call(t)!==o||r!==o});return oo={correct:r}}(),o=Gr(),i=RegExp.prototype;return ao=r.correct?function(e){return e.flags}:function(a){return r.correct||!n(i,a)||t(a,"flags")?a.flags:e(o,a)}}!function(){if(co)return fo;co=1;var e=Ht(),t=D(),n=function(){if(to)return eo;to=1,Kr();var e=Ht(),t=xn(),n=qr(),r=w(),o=ve(),i=ln(),a=o("species"),s=RegExp.prototype;return eo=function(u,l,c,d){var f=o(u),p=!r(function(){var e={};return e[f]=function(){return 7},7!==""[u](e)}),h=p&&!r(function(){var e=!1,t=/a/;if("split"===u){var n={};n[a]=function(){return t},(t={constructor:n,flags:""})[f]=/./[f]}return t.exec=function(){return e=!0,null},t[f](""),!e});if(!p||!h||c){var g=/./[f],v=l(f,""[u],function(t,r,o,i,a){var u=r.exec;return u===n||u===s.exec?p&&!a?{done:!0,value:e(g,r,o,i)}:{done:!0,value:e(t,o,r,i)}:{done:!1}});t(String.prototype,u,v[0]),t(s,f,v[1])}d&&i(s[f],"sham",!0)},eo}(),r=be(),o=ye(),i=Zt(),a=Wr(),s=x(),u=Gt(),l=po(),c=ho(),d=function(){if(lo)return uo;lo=1;var e=Ht(),t=be(),n=me(),r=A(),o=qr(),i=TypeError;return uo=function(a,s){var u=a.exec;if(n(u)){var l=e(u,a,s);return null!==l&&t(l),l}if("RegExp"===r(a))return e(o,a,s);throw new i("RegExp#exec called on incompatible receiver")},uo}(),f=t("".indexOf);n("match",function(t,n,p){return[function(n){var r=s(this),i=o(n)?u(n,t):void 0;return i?e(i,n,r):new RegExp(n)[t](a(r))},function(e){var t=r(this),o=a(e),s=p(n,t,o);if(s.done)return s.value;var u=a(c(t));if(!~f(u,"g"))return d(t,o);var h=!!~f(u,"u")||!!~f(u,"v");t.lastIndex=0;for(var g,v=[],m=0;null!==(g=d(t,o));){var y=a(g[0]);v[m]=y,""===y&&(t.lastIndex=l(o,i(t.lastIndex),h)),m++}return 0===m?null:v}]})}();var go,vo,mo,yo,bo,Eo,wo,Co,Do,Ao,So,Oo,xo,No,Bo,To,ko,Fo,Io,Po,Ro,_o,Lo,Mo,jo,Ho,zo,$o={},Uo={};function Vo(){if(vo)return go;vo=1;var e=ye(),t=ln();return go=function(n,r){e(r)&&"cause"in r&&t(n,"cause",r.cause)},go}function Wo(){if(Co)return wo;Co=1;var e=ln(),t=function(){if(yo)return mo;yo=1;var e=D(),t=Error,n=e("".replace),r=String(new t("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,i=o.test(r);return mo=function(e,r){if(i&&"string"==typeof e&&!t.prepareStackTrace)for(;r--;)e=n(e,o,"");return e}}(),n=function(){if(Eo)return bo;Eo=1;var e=w(),t=un();return bo=!e(function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",t(1,7)),7!==e.stack)})}(),r=Error.captureStackTrace;return wo=function(o,i,a,s){n&&(r?r(o,i):e(o,"stack",t(a,s)))},wo}function Go(){if(Oo)return So;Oo=1;var e=function(){if(Ao)return Do;Ao=1;var e=A(),t=D();return Do=function(n){if("Function"===e(n))return t(n)}}(),t=Wt(),n=C(),r=e(e.bind);return So=function(e,o){return t(e),void 0===o?e:n?r(e,o):function(){return e.apply(o,arguments)}},So}function qo(){if(No)return xo;No=1;var e=ve(),t=sn(),n=e("iterator"),r=Array.prototype;return xo=function(e){return void 0!==e&&(t.Array===e||r[n]===e)}}function Ko(){if(To)return Bo;To=1;var e=Tr(),t=Gt(),n=O(),r=sn(),o=ve()("iterator");return Bo=function(i){if(!n(i))return t(i,o)||t(i,"@@iterator")||r[e(i)]}}function Yo(){if(Fo)return ko;Fo=1;var e=Ht(),t=Wt(),n=be(),r=Vt(),o=Ko(),i=TypeError;return ko=function(a,s){var u=arguments.length<2?o(a):s;if(t(u))return n(e(u,a));throw new i(r(a)+" is not iterable")},ko}function Xo(){if(Po)return Io;Po=1;var e=Ht(),t=be(),n=Gt();return Io=function(r,o,i){var a,s;t(r);try{if(!(a=n(r,"return"))){if("throw"===o)throw i;return i}a=e(a,r)}catch(e){s=!0,a=e}if("throw"===o)throw i;if(s)throw a;return t(a),i},Io}function Zo(){if(_o)return Ro;_o=1;var e=Go(),t=Ht(),n=be(),r=Vt(),o=qo(),i=Jt(),a=$t(),s=Yo(),u=Ko(),l=Xo(),c=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return Ro=function(p,h,g){var v,m,y,b,E,w,C,D=g&&g.that,A=!(!g||!g.AS_ENTRIES),S=!(!g||!g.IS_RECORD),O=!(!g||!g.IS_ITERATOR),x=!(!g||!g.INTERRUPTED),N=e(h,D),B=function(e){var t=v;return v=void 0,t&&l(t,"normal"),new d(!0,e)},T=function(e){return A?(n(e),x?N(e[0],e[1],B):N(e[0],e[1])):x?N(e,B):N(e)};if(S)v=p.iterator;else if(O)v=p;else{if(!(m=u(p)))throw new c(r(p)+" is not iterable");if(o(m)){for(y=0,b=i(p);b>y;y++)if((E=T(p[y]))&&a(f,E))return E;return new d(!1)}v=s(p,m)}for(w=S?p.next:v.next;!(C=t(w,v)).done;){var k=C.value;try{E=T(k)}catch(e){if(!v)throw e;l(v,"throw",e)}if("object"==typeof E&&E&&a(f,E))return E}return new d(!1)},Ro}function Jo(){if(Mo)return Lo;Mo=1;var e=Wr();return Lo=function(t,n){return void 0===t?arguments.length<2?"":n:e(t)},Lo}function Qo(){return Ho||(Ho=1,function(){if(jo)return Uo;jo=1;var e=fr(),t=$t(),n=pr(),r=mr(),o=dr(),i=an(),a=ln(),s=un(),u=Vo(),l=Wo(),c=Zo(),d=Jo(),f=ve()("toStringTag"),p=Error,h=[].push,g=function(e,o){var s,m=t(v,this);r?s=r(new p,m?n(this):v):(s=m?this:i(v),a(s,f,"Error")),void 0!==o&&a(s,"message",d(o)),l(s,g,s.stack,1),arguments.length>2&&u(s,arguments[2]);var y=[];return c(e,h,{that:y}),a(s,"errors",y),s};r?r(g,p):o(g,p,{name:!0});var v=g.prototype=i(p.prototype,{constructor:s(1,g),message:s(1,""),name:s(1,"AggregateError")});e({global:!0,constructor:!0,arity:2},{AggregateError:g})}()),$o}zo||(zo=1,Qo());var ei,ti,ni={};ti||(ti=1,function(){if(ei)return ni;ei=1;var e=fr(),t=B();e({global:!0,forced:t.globalThis!==t},{globalThis:t})}());var ri,oi,ii,ai,si,ui,li={};function ci(){return oi?ri:(oi=1,ri={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0})}function di(){if(ai)return ii;ai=1;var e=Mt()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return ii=t===Object.prototype?void 0:t}if(function(){if(si)return li;si=1;var e=B(),t=ci(),n=di(),r=Er(),o=ln(),i=gr(),a=ve()("iterator"),s=r.values,u=function(e,n){if(e){if(e[a]!==s)try{o(e,a,s)}catch(t){e[a]=s}if(i(e,n,!0),t[n])for(var u in r)if(e[u]!==r[u])try{o(e,u,r[u])}catch(t){e[u]=r[u]}}};for(var l in t)u(e[l]&&e[l].prototype,l);u(n,"DOMTokenList")}(),"undefined"==typeof global){if("ActiveXObject"in window){console.error("抱歉,wangEditor V5+ 版本开始,不在支持 IE 浏览器\n Sorry, wangEditor V5+ versions do not support IE browser.")}fi(),pi()}else global&&(null===(ui=global.navigator)||void 0===ui?void 0:ui.userAgent.match("QQBrowser"))&&(fi(),pi());function fi(){"undefined"==typeof globalThis&&(window.globalThis=window)}function pi(){"undefined"==typeof AggregateError&&(window.AggregateError=function(e,t){var n=new Error(t);return n.errors=e,n})}var hi,gi,vi,mi,yi,bi,Ei,wi,Ci,Di,Ai,Si,Oi,xi,Ni,Bi,Ti={};function ki(){if(gi)return hi;gi=1;var e=function(e){return e&&e.Math===Math&&e};return hi=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof y&&y)||e("object"==typeof hi&&hi)||function(){return this}()||Function("return this")()}function Fi(){return mi?vi:(mi=1,vi=function(e){try{return!!e()}catch(e){return!0}})}function Ii(){return bi?yi:(bi=1,yi=!Fi()(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))}function Pi(){if(wi)return Ei;wi=1;var e=Ii(),t=Function.prototype,n=t.apply,r=t.call;return Ei="object"==typeof Reflect&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),Ei}function Ri(){if(Di)return Ci;Di=1;var e=Ii(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return Ci=e?r:function(e){return function(){return n.apply(e,arguments)}},Ci}function _i(){if(Si)return Ai;Si=1;var e=Ri(),t=e({}.toString),n=e("".slice);return Ai=function(e){return n(t(e),8,-1)}}function Li(){if(xi)return Oi;xi=1;var e=_i(),t=Ri();return Oi=function(n){if("Function"===e(n))return t(n)}}function Mi(){if(Bi)return Ni;Bi=1;var e="object"==typeof document&&document.all;return Ni=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}var ji,Hi,zi,$i,Ui={};function Vi(){return Hi?ji:(Hi=1,ji=!Fi()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function Wi(){if($i)return zi;$i=1;var e=Ii(),t=Function.prototype.call;return zi=e?t.bind(t):function(){return t.apply(t,arguments)},zi}var Gi,qi,Ki,Yi,Xi,Zi,Ji,Qi,ea,ta,na,ra,oa,ia,aa,sa,ua,la,ca,da,fa,pa,ha,ga,va,ma,ya,ba,Ea,wa,Ca,Da,Aa,Sa,Oa,xa,Na,Ba={};function Ta(){if(Gi)return Ba;Gi=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return Ba.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,Ba}function ka(){return Ki?qi:(Ki=1,qi=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function Fa(){if(Xi)return Yi;Xi=1;var e=Ri(),t=Fi(),n=_i(),r=Object,o=e("".split);return Yi=t(function(){return!r("z").propertyIsEnumerable(0)})?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function Ia(){return Ji?Zi:(Ji=1,Zi=function(e){return null==e})}function Pa(){if(ea)return Qi;ea=1;var e=Ia(),t=TypeError;return Qi=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function Ra(){if(na)return ta;na=1;var e=Fa(),t=Pa();return ta=function(n){return e(t(n))}}function _a(){if(oa)return ra;oa=1;var e=Mi();return ra=function(t){return"object"==typeof t?null!==t:e(t)}}function La(){return aa?ia:(aa=1,ia={})}function Ma(){if(ua)return sa;ua=1;var e=La(),t=ki(),n=Mi(),r=function(e){return n(e)?e:void 0};return sa=function(n,o){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][o]||t[n]&&t[n][o]},sa}function ja(){return ca?la:(ca=1,la=Ri()({}.isPrototypeOf))}function Ha(){if(fa)return da;fa=1;var e=ki().navigator,t=e&&e.userAgent;return da=t?String(t):""}function za(){if(ha)return pa;ha=1;var e,t,n=ki(),r=Ha(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(t=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&r&&(!(e=r.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1]),pa=t}function $a(){if(va)return ga;va=1;var e=za(),t=Fi(),n=ki().String;return ga=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),ga}function Ua(){return ya?ma:(ya=1,ma=$a()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function Va(){if(Ea)return ba;Ea=1;var e=Ma(),t=Mi(),n=ja(),r=Object;return ba=Ua()?function(e){return"symbol"==typeof e}:function(o){var i=e("Symbol");return t(i)&&n(i.prototype,r(o))}}function Wa(){if(Ca)return wa;Ca=1;var e=String;return wa=function(t){try{return e(t)}catch(e){return"Object"}}}function Ga(){if(Aa)return Da;Aa=1;var e=Mi(),t=Wa(),n=TypeError;return Da=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function qa(){if(Oa)return Sa;Oa=1;var e=Ga(),t=Ia();return Sa=function(n,r){var o=n[r];return t(o)?void 0:e(o)},Sa}function Ka(){if(Na)return xa;Na=1;var e=Wi(),t=Mi(),n=_a(),r=TypeError;return xa=function(o,i){var a,s;if("string"===i&&t(a=o.toString)&&!n(s=e(a,o)))return s;if(t(a=o.valueOf)&&!n(s=e(a,o)))return s;if("string"!==i&&t(a=o.toString)&&!n(s=e(a,o)))return s;throw new r("Can't convert object to primitive value")},xa}var Ya,Xa,Za,Ja,Qa,es,ts,ns,rs,os,is,as,ss,us,ls,cs,ds,fs,ps,hs,gs,vs,ms,ys,bs,Es,ws,Cs,Ds={exports:{}};function As(){return Xa?Ya:(Xa=1,Ya=!0)}function Ss(){if(Ja)return Za;Ja=1;var e=ki(),t=Object.defineProperty;return Za=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function Os(){if(Qa)return Ds.exports;Qa=1;var e=As(),t=ki(),n=Ss(),r="__core-js_shared__",o=Ds.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.49.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Ds.exports}function xs(){if(ts)return es;ts=1;var e=Os();return es=function(t,n){return e[t]||(e[t]=n||{})}}function Ns(){if(rs)return ns;rs=1;var e=Pa(),t=Object;return ns=function(n){return t(e(n))}}function Bs(){if(is)return os;is=1;var e=Ri(),t=Ns(),n=e({}.hasOwnProperty);return os=Object.hasOwn||function(e,r){return n(t(e),r)}}function Ts(){if(ss)return as;ss=1;var e=Ri(),t=0,n=Math.random(),r=e(1.1.toString);return as=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function ks(){if(ls)return us;ls=1;var e=ki(),t=xs(),n=Bs(),r=Ts(),o=$a(),i=Ua(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return us=function(e){return n(s,e)||(s[e]=o&&n(a,e)?a[e]:u("Symbol."+e)),s[e]}}function Fs(){if(ds)return cs;ds=1;var e=Wi(),t=_a(),n=Va(),r=qa(),o=Ka(),i=TypeError,a=ks()("toPrimitive");return cs=function(s,u){if(!t(s)||n(s))return s;var l,c=r(s,a);if(c){if(void 0===u&&(u="default"),l=e(c,s,u),!t(l)||n(l))return l;throw new i("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(s,u)}}function Is(){if(ps)return fs;ps=1;var e=Fs(),t=Va();return fs=function(n){var r=e(n,"string");return t(r)?r:r+""}}function Ps(){if(gs)return hs;gs=1;var e=ki(),t=_a(),n=e.document,r=t(n)&&t(n.createElement);return hs=function(e){return r?n.createElement(e):{}}}function Rs(){if(ms)return vs;ms=1;var e=Vi(),t=Fi(),n=Ps();return vs=!e&&!t(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function _s(){if(ys)return Ui;ys=1;var e=Vi(),t=Wi(),n=Ta(),r=ka(),o=Ra(),i=Is(),a=Bs(),s=Rs(),u=Object.getOwnPropertyDescriptor;return Ui.f=e?u:function(e,l){if(e=o(e),l=i(l),s)try{return u(e,l)}catch(e){}if(a(e,l))return r(!t(n.f,e,l),e[l])},Ui}function Ls(){if(Es)return bs;Es=1;var e=Fi(),t=Mi(),n=/#|\.prototype\./,r=function(n,r){var u=i[o(n)];return u===s||u!==a&&(t(r)?e(r):!!r)},o=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return bs=r}function Ms(){if(Cs)return ws;Cs=1;var e=Li(),t=Ga(),n=Ii(),r=e(e.bind);return ws=function(e,o){return t(e),void 0===o?e:n?r(e,o):function(){return e.apply(o,arguments)}},ws}var js,Hs,zs,$s,Us,Vs,Ws,Gs,qs,Ks,Ys,Xs,Zs,Js,Qs,eu,tu,nu,ru,ou,iu,au,su,uu,lu,cu,du,fu,pu,hu,gu,vu,mu,yu,bu,Eu,wu,Cu,Du,Au,Su={};function Ou(){return Hs?js:(Hs=1,js=Vi()&&Fi()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function xu(){if($s)return zs;$s=1;var e=_a(),t=String,n=TypeError;return zs=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}function Nu(){if(Us)return Su;Us=1;var e=Vi(),t=Rs(),n=Ou(),r=xu(),o=Is(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Su.f=e?n?function(e,t,n){if(r(e),t=o(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var i=s(e,t);i&&i[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(e,t,n)}:a:function(e,n,s){if(r(e),n=o(n),r(s),t)try{return a(e,n,s)}catch(e){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(e[n]=s.value),e},Su}function Bu(){if(Ws)return Vs;Ws=1;var e=Vi(),t=Nu(),n=ka();return Vs=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}function Tu(){if(qs)return Gs;qs=1;var e=ki(),t=Pi(),n=Li(),r=Mi(),o=_s().f,i=Ls(),a=La(),s=Ms(),u=Bu(),l=Bs(),c=function(e){var n=function(r,o,i){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,o)}return new e(r,o,i)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return Gs=function(t,d){var f,p,h,g,v,m,y,b,E,w=t.target,C=t.global,D=t.stat,A=t.proto,S=C?e:D?e[w]:e[w]&&e[w].prototype,O=C?a:a[w]||u(a,w,{})[w],x=O.prototype;for(g in d)p=!(f=i(C?g:w+(D?".":"#")+g,t.forced))&&S&&l(S,g),m=O[g],p&&(y=t.dontCallGetSet?(E=o(S,g))&&E.value:S[g]),v=p&&y?y:d[g],(f||A||typeof m!=typeof v)&&(b=t.bind&&p?s(v,e):t.wrap&&p?c(v):A&&r(v)?n(v):v,(t.sham||v&&v.sham||m&&m.sham)&&u(b,"sham",!0),u(O,g,b),A&&(l(a,h=w+"Prototype")||u(a,h,{}),u(a[h],g,v),t.real&&x&&(f||!x[g])&&u(x,g,v)))}}function ku(){if(Ys)return Ks;Ys=1;var e=_i();return Ks=Array.isArray||function(t){return"Array"===e(t)}}function Fu(){if(Zs)return Xs;Zs=1;var e=Math.ceil,t=Math.floor;return Xs=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Xs}function Iu(){if(Qs)return Js;Qs=1;var e=Fu();return Js=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function Pu(){if(tu)return eu;tu=1;var e=Iu(),t=Math.min;return eu=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function Ru(){if(ru)return nu;ru=1;var e=Pu();return nu=function(t){return e(t.length)}}function _u(){if(iu)return ou;iu=1;var e=TypeError;return ou=function(t){if(t>9007199254740991)throw new e("Maximum allowed index exceeded");return t}}function Lu(){if(su)return au;su=1;var e=Vi(),t=Nu(),n=ka();return au=function(r,o,i){e?t.f(r,o,n(0,i)):r[o]=i}}function Mu(){if(lu)return uu;lu=1;var e=Vi(),t=ku(),n=TypeError,r=Object.getOwnPropertyDescriptor,o=e&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();return uu=o?function(e,o){if(t(e)&&!r(e,"length").writable)throw new n("Cannot set read only .length");return e.length=o}:function(e,t){return e.length=t},uu}function ju(){if(du)return cu;du=1;var e={};return e[ks()("toStringTag")]="z",cu="[object z]"===String(e)}function Hu(){if(pu)return fu;pu=1;var e=ju(),t=Mi(),n=_i(),r=ks()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return fu=e?n:function(e){var a,s,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(a=o(e),r))?s:i?n(a):"Object"===(u=n(a))&&t(a.callee)?"Arguments":u},fu}function zu(){if(gu)return hu;gu=1;var e=Ri(),t=Mi(),n=Os(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),hu=n.inspectSource}function $u(){if(mu)return vu;mu=1;var e=Ri(),t=Fi(),n=Mi(),r=Hu(),o=Ma(),i=zu(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=e(u.exec),c=!u.test(a),d=function(e){if(!n(e))return!1;try{return s(a,[],e),!0}catch(e){return!1}},f=function(e){if(!n(e))return!1;switch(r(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(e))}catch(e){return!0}};return f.sham=!0,vu=!s||t(function(){var e;return d(d.call)||!d(Object)||!d(function(){e=!0})||e})?f:d}function Uu(){if(bu)return yu;bu=1;var e=ku(),t=$u(),n=_a(),r=ks()("species"),o=Array;return yu=function(i){var a;return e(i)&&(a=i.constructor,(t(a)&&(a===o||e(a.prototype))||n(a)&&null===(a=a[r]))&&(a=void 0)),void 0===a?o:a},yu}function Vu(){if(wu)return Eu;wu=1;var e=Uu();return Eu=function(t,n){return new(e(t))(0===n?0:n)}}function Wu(){if(Du)return Cu;Du=1;var e=Fi(),t=ks(),n=za(),r=t("species");return Cu=function(t){return n>=51||!e(function(){var e=[];return(e.constructor={})[r]=function(){return{foo:1}},1!==e[t](Boolean).foo})},Cu}var Gu,qu,Ku={},Yu={};function Xu(){if(qu)return Gu;qu=1;var e=Hu(),t=String;return Gu=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}var Zu,Ju,Qu,el,tl,nl,rl,ol,il,al,sl,ul,ll,cl,dl,fl,pl,hl,gl,vl={};function ml(){if(Ju)return Zu;Ju=1;var e=Iu(),t=Math.max,n=Math.min;return Zu=function(r,o){var i=e(r);return i<0?t(i+o,0):n(i,o)},Zu}function yl(){if(el)return Qu;el=1;var e=Ra(),t=ml(),n=Ru(),r=function(r){return function(o,i,a){var s=e(o),u=n(s);if(0===u)return!r&&-1;var l,c=t(a,u);if(r&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((r||c in s)&&s[c]===i)return r||c||0;return!r&&-1}};return Qu={includes:r(!0),indexOf:r(!1)}}function bl(){return nl?tl:(nl=1,tl={})}function El(){if(ol)return rl;ol=1;var e=Ri(),t=Bs(),n=Ra(),r=yl().indexOf,o=bl(),i=e([].push);return rl=function(e,a){var s,u=n(e),l=0,c=[];for(s in u)!t(o,s)&&t(u,s)&&i(c,s);for(;a.length>l;)t(u,s=a[l++])&&(~r(c,s)||i(c,s));return c},rl}function wl(){return al?il:(al=1,il=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function Cl(){if(ul)return sl;ul=1;var e=El(),t=wl();return sl=Object.keys||function(n){return e(n,t)},sl}function Dl(){if(ll)return vl;ll=1;var e=Vi(),t=Ou(),n=Nu(),r=xu(),o=Ra(),i=Cl();return vl.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)n.f(e,a=u[c++],s[a]);return e},vl}function Al(){return dl?cl:(dl=1,cl=Ma()("document","documentElement"))}function Sl(){if(pl)return fl;pl=1;var e=xs(),t=Ts(),n=e("keys");return fl=function(e){return n[e]||(n[e]=t(e))}}function Ol(){if(gl)return hl;gl=1;var e,t=xu(),n=Dl(),r=wl(),o=bl(),i=Al(),a=Ps(),s="prototype",u="script",l=Sl()("IE_PROTO"),c=function(){},d=function(e){return"<"+u+">"+e+"</"+u+">"},f=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},p=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;p="undefined"!=typeof document?document.domain&&e?f(e):(n=a("iframe"),o="java"+u+":",n.style.display="none",i.appendChild(n),n.src=String(o),(t=n.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):f(e);for(var l=r.length;l--;)delete p[s][r[l]];return p()};return o[l]=!0,hl=Object.create||function(e,r){var o;return null!==e?(c[s]=t(e),o=new c,c[s]=null,o[l]=e):o=p(),void 0===r?o:n.f(o,r)},hl}var xl,Nl={};function Bl(){if(xl)return Nl;xl=1;var e=El(),t=wl().concat("length","prototype");return Nl.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Nl}var Tl,kl,Fl,Il={};function Pl(){return kl?Tl:(kl=1,Tl=Ri()([].slice))}function Rl(){if(Fl)return Il;Fl=1;var e=_i(),t=Ra(),n=Bl().f,r=Pl(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Il.f=function(i){return o&&"Window"===e(i)?function(e){try{return n(e)}catch(e){return r(o)}}(i):n(t(i))},Il}var _l,Ll,Ml,jl,Hl,zl={};function $l(){return _l||(_l=1,zl.f=Object.getOwnPropertySymbols),zl}function Ul(){if(Ml)return Ll;Ml=1;var e=Bu();return Ll=function(t,n,r,o){return o&&o.enumerable?t[n]=r:e(t,n,r),t}}function Vl(){if(Hl)return jl;Hl=1;var e=Nu();return jl=function(t,n,r){return e.f(t,n,r)}}var Wl,Gl,ql,Kl,Yl,Xl,Zl,Jl,Ql,ec,tc,nc,rc,oc,ic,ac,sc={};function uc(){if(Wl)return sc;Wl=1;var e=ks();return sc.f=e,sc}function lc(){if(ql)return Gl;ql=1;var e=La(),t=Bs(),n=uc(),r=Nu().f;return Gl=function(o){var i=e.Symbol||(e.Symbol={});t(i,o)||r(i,o,{value:n.f(o)})}}function cc(){if(Yl)return Kl;Yl=1;var e=Wi(),t=Ma(),n=ks(),r=Ul();return Kl=function(){var o=t("Symbol"),i=o&&o.prototype,a=i&&i.valueOf,s=n("toPrimitive");i&&!i[s]&&r(i,s,function(t){return e(a,this)},{arity:1})}}function dc(){if(Zl)return Xl;Zl=1;var e=ju(),t=Hu();return Xl=e?{}.toString:function(){return"[object "+t(this)+"]"}}function fc(){if(Ql)return Jl;Ql=1;var e=ju(),t=Nu().f,n=Bu(),r=Bs(),o=dc(),i=ks()("toStringTag");return Jl=function(a,s,u,l){var c=u?a:a&&a.prototype;c&&(r(c,i)||t(c,i,{configurable:!0,value:s}),l&&!e&&n(c,"toString",o))}}function pc(){if(tc)return ec;tc=1;var e=ki(),t=Mi(),n=e.WeakMap;return ec=t(n)&&/native code/.test(String(n))}function hc(){if(rc)return nc;rc=1;var e,t,n,r=pc(),o=ki(),i=_a(),a=Bu(),s=Bs(),u=Os(),l=Sl(),c=bl(),d="Object already initialized",f=o.TypeError,p=o.WeakMap;if(r||u.state){var h=u.state||(u.state=new p);h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new f(d);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var g=l("state");c[g]=!0,e=function(e,t){if(s(e,g))throw new f(d);return t.facade=e,a(e,g,t),t},t=function(e){return s(e,g)?e[g]:{}},n=function(e){return s(e,g)}}return nc={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!i(n)||(r=t(n)).type!==e)throw new f("Incompatible receiver, "+e+" required");return r}}}}function gc(){if(ic)return oc;ic=1;var e=Ms(),t=Fa(),n=Ns(),r=Ru(),o=Vu(),i=Lu(),a=function(a){var s=1===a,u=2===a,l=3===a,c=4===a,d=6===a,f=7===a,p=5===a||d;return function(h,g,v){for(var m,y,b=n(h),E=t(b),w=r(E),C=e(g,v),D=0,A=0,S=s?o(h,w):u||f?o(h,0):void 0;w>D;D++)if((p||D in E)&&(y=C(m=E[D],D,b),a))if(s)i(S,D,y);else if(y)switch(a){case 3:return!0;case 5:return m;case 6:return D;case 2:i(S,A++,m)}else switch(a){case 4:return!1;case 7:i(S,A++,m)}return d?-1:l||c?c:S}};return oc={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}}var vc,mc,yc,bc={};function Ec(){return mc?vc:(mc=1,vc=$a()&&!!Symbol.for&&!!Symbol.keyFor)}var wc,Cc={};var Dc,Ac,Sc,Oc,xc,Nc,Bc,Tc={};function kc(){if(Ac)return Dc;Ac=1;var e=_a(),t=hc().get;return Dc=function(n){if(!e(n))return!1;var r=t(n);return!!r&&"RawJSON"===r.type},Dc}function Fc(){if(Oc)return Sc;Oc=1;var e=Ri(),t=Bs(),n=SyntaxError,r=parseInt,o=String.fromCharCode,i=e("".charAt),a=e("".slice),s=e(/./.exec),u={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},l=/^[\da-f]{4}$/i,c=/^[\u0000-\u001F]$/;return Sc=function(e,d){for(var f=!0,p="";d<e.length;){var h=i(e,d);if("\\"===h){var g=a(e,d,d+2);if(t(u,g))p+=u[g],d+=2;else{if("\\u"!==g)throw new n('Unknown escape sequence: "'+g+'"');var v=a(e,d+=2,d+4);if(!s(l,v))throw new n("Bad Unicode escape at: "+d);p+=o(r(v,16)),d+=4}}else{if('"'===h){f=!1,d++;break}if(s(c,h))throw new n("Bad control character in string literal at: "+d);p+=h,d++}}if(f)throw new n("Unterminated string at: "+d);return{value:p,end:d}},Sc}function Ic(){return Nc?xc:(Nc=1,xc=!Fi()(function(){var e="9007199254740993",t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e}))}var Pc,Rc,_c={};function Lc(){return Rc||(Rc=1,function(){if(ac)return Yu;ac=1;var e=Tu(),t=ki(),n=Wi(),r=Ri(),o=As(),i=Vi(),a=$a(),s=Fi(),u=Bs(),l=ja(),c=xu(),d=Ra(),f=Is(),p=Xu(),h=ka(),g=Ol(),v=Cl(),m=Bl(),y=Rl(),b=$l(),E=_s(),w=Nu(),C=Dl(),D=Ta(),A=Ul(),S=Vl(),O=xs(),x=Sl(),N=bl(),B=Ts(),T=ks(),k=uc(),F=lc(),I=cc(),P=fc(),R=hc(),_=gc().forEach,L=x("hidden"),M="Symbol",j="prototype",H=R.set,z=R.getterFor(M),$=Object[j],U=t.Symbol,V=U&&U[j],W=t.RangeError,G=t.TypeError,q=t.QObject,K=E.f,Y=w.f,X=y.f,Z=D.f,J=r([].push),Q=O("symbols"),ee=O("op-symbols"),te=O("wks"),ne=!q||!q[j]||!q[j].findChild,re=function(e,t,n){var r=K($,t);return r&&delete $[t],Y(e,t,n),r&&e!==$&&Y($,t,r),e},oe=i&&s(function(){return 7!==g(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a})?re:Y,ie=function(e,t){var n=Q[e]=g(V);return H(n,{type:M,tag:e,description:t}),i||(n.description=t),n},ae=function(e,t,n){e===$&&ae(ee,t,n),c(e);var r=f(t);return c(n),u(Q,r)?(("enumerable"in n?!n.enumerable:!u(e,r)||u(e,L)&&e[L][r])?(u(e,L)||Y(e,L,h(1,g(null))),e[L][r]=!0):(u(e,L)&&e[L][r]&&(e[L][r]=!1),n=g(n,{enumerable:h(0,!1)})),oe(e,r,n)):Y(e,r,n)},se=function(e,t){c(e);var r=d(t),o=v(r).concat(de(r));return _(o,function(t){i&&!n(ue,r,t)||ae(e,t,r[t])}),e},ue=function(e){var t=f(e),r=n(Z,this,t);return!(this===$&&u(Q,t)&&!u(ee,t))&&(!(r||!u(this,t)||!u(Q,t)||u(this,L)&&this[L][t])||r)},le=function(e,t){var n=d(e),r=f(t);if(n!==$||!u(Q,r)||u(ee,r)){var o=K(n,r);return!o||!u(Q,r)||u(n,L)&&n[L][r]||(o.enumerable=!0),o}},ce=function(e){var t=X(d(e)),n=[];return _(t,function(e){u(Q,e)||u(N,e)||J(n,e)}),n},de=function(e){var t=e===$,n=X(t?ee:d(e)),r=[];return _(n,function(e){!u(Q,e)||t&&!u($,e)||J(r,Q[e])}),r};a||(U=function(){if(l(V,this))throw new G("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?p(arguments[0]):void 0,r=B(e),o=function(e){var i=void 0===this?t:this;i===$&&n(o,ee,e),u(i,L)&&u(i[L],r)&&(i[L][r]=!1);var a=h(1,e);try{oe(i,r,a)}catch(e){if(!(e instanceof W))throw e;re(i,r,a)}};return i&&ne&&oe($,r,{configurable:!0,set:o}),ie(r,e)},A(V=U[j],"toString",function(){return z(this).tag}),A(U,"withoutSetter",function(e){return ie(B(e),e)}),D.f=ue,w.f=ae,C.f=se,E.f=le,m.f=y.f=ce,b.f=de,k.f=function(e){return ie(T(e),e)},i&&(S(V,"description",{configurable:!0,get:function(){return z(this).description}}),o||A($,"propertyIsEnumerable",ue,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!a,sham:!a},{Symbol:U}),_(v(te),function(e){F(e)}),e({target:M,stat:!0,forced:!a},{useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),e({target:"Object",stat:!0,forced:!a,sham:!i},{create:function(e,t){return void 0===t?g(e):se(g(e),t)},defineProperty:ae,defineProperties:se,getOwnPropertyDescriptor:le}),e({target:"Object",stat:!0,forced:!a},{getOwnPropertyNames:ce}),I(),P(U,M),N[L]=!0}(),function(){if(yc)return bc;yc=1;var e=Tu(),t=Ma(),n=Bs(),r=Xu(),o=xs(),i=Ec(),a=o("string-to-symbol-registry"),s=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{for:function(e){var o=r(e);if(n(a,o))return a[o];var i=t("Symbol")(o);return a[o]=i,s[i]=o,i}})}(),function(){if(wc)return Cc;wc=1;var e=Tu(),t=Bs(),n=Va(),r=Wa(),o=xs(),i=Ec(),a=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{keyFor:function(e){if(!n(e))throw new TypeError(r(e)+" is not a symbol");if(t(a,e))return a[e]}})}(),function(){if(Bc)return Tc;Bc=1;var e=Tu(),t=Ma(),n=Pi(),r=Wi(),o=Ri(),i=Fi(),a=ku(),s=Mi(),u=kc(),l=Va(),c=_i(),d=Xu(),f=Pl(),p=Fc(),h=Ts(),g=$a(),v=Ic(),m=String,y=t("JSON","stringify"),b=o(/./.exec),E=o("".charAt),w=o("".charCodeAt),C=o("".replace),D=o("".slice),A=o([].push),S=o(1.1.toString),O=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,N=/^[\uDC00-\uDFFF]$/,B=h(),T=B.length,k=!g||i(function(){var e=t("Symbol")("stringify detection");return"[null]"!==y([e])||"{}"!==y({a:e})||"{}"!==y(Object(e))}),F=i(function(){return'"\\udf06\\ud834"'!==y("\udf06\ud834")||'"\\udead"'!==y("\udead")}),I=k?function(e,t){var o=f(arguments),i=R(t);if(s(i)||void 0!==e&&!l(e))return o[1]=function(e,t){if(s(i)&&(t=r(i,this,m(e),t)),!l(t))return t},n(y,null,o)}:y,P=function(e,t,n){var r=E(n,t-1),o=E(n,t+1);return b(x,e)&&!b(N,o)||b(N,e)&&!b(x,r)?"\\u"+S(w(e,0),16):e},R=function(e){if(s(e))return e;if(a(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];"string"==typeof o?A(n,o):"number"!=typeof o&&"Number"!==c(o)&&"String"!==c(o)||A(n,d(o))}var i=n.length,u=!0;return function(e,t){if(u)return u=!1,t;if(a(this))return t;for(var r=0;r<i;r++)if(n[r]===e)return t}}};y&&e({target:"JSON",stat:!0,arity:3,forced:k||F||!v},{stringify:function(e,t,n){var o=R(t),i=[],a=I(e,function(e,t){var n=s(o)?r(o,this,m(e),t):t;return!v&&u(n)?B+(A(i,n.rawJSON)-1):n},n);if("string"!=typeof a)return a;if(F&&(a=C(a,O,P)),v)return a;for(var l="",c=a.length,d=0;d<c;d++){var f=E(a,d);if('"'===f){var h=p(a,++d).end-1,g=D(a,d,h);l+=D(g,0,T)===B?i[D(g,T)]:'"'+g+'"',d=h}else l+=f}return l}})}(),function(){if(Pc)return _c;Pc=1;var e=Tu(),t=$a(),n=Fi(),r=$l(),o=Ns();e({target:"Object",stat:!0,forced:!t||n(function(){r.f(1)})},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(o(e)):[]}})}()),Ku}var Mc,jc={};function Hc(){return Mc||(Mc=1,lc()("asyncDispose")),jc}var zc;var $c,Uc={};function Vc(){return $c||($c=1,lc()("dispose")),Uc}var Wc;var Gc;var qc,Kc={};function Yc(){return qc||(qc=1,lc()("iterator")),Kc}var Xc;var Zc;var Jc;var Qc;var ed;var td;var nd,rd={};var od,id={};var ad;var sd,ud,ld,cd={};function dd(){return ld?ud:(ld=1,function(){if(Au)return Ti;Au=1;var e=Tu(),t=Fi(),n=ku(),r=_a(),o=Ns(),i=Ru(),a=_u(),s=Lu(),u=Mu(),l=Vu(),c=Wu(),d=ks(),f=za(),p=d("isConcatSpreadable"),h=f>=51||!t(function(){var e=[];return e[p]=!1,e.concat()[0]!==e}),g=function(e){if(!r(e))return!1;var t=e[p];return void 0!==t?!!t:n(e)};e({target:"Array",proto:!0,arity:1,forced:!h||!c("concat")},{concat:function(e){var t,n,r,c,d,f=o(this),p=l(f,0),h=0;for(t=-1,r=arguments.length;t<r;t++)if(g(d=-1===t?f:arguments[t]))for(c=i(d),a(h+c),n=0;n<c;n++,h++)n in d&&s(p,h,d[n]);else a(h+1),s(p,h++,d);return u(p,h),p}})}(),Lc(),Hc(),zc||(zc=1,lc()("asyncIterator")),Vc(),Wc||(Wc=1,lc()("hasInstance")),Gc||(Gc=1,lc()("isConcatSpreadable")),Yc(),Xc||(Xc=1,lc()("match")),Zc||(Zc=1,lc()("matchAll")),Jc||(Jc=1,lc()("replace")),Qc||(Qc=1,lc()("search")),ed||(ed=1,lc()("species")),td||(td=1,lc()("split")),function(){if(nd)return rd;nd=1;var e=lc(),t=cc();e("toPrimitive"),t()}(),function(){if(od)return id;od=1;var e=Ma(),t=lc(),n=fc();t("toStringTag"),n(e("Symbol"),"Symbol")}(),ad||(ad=1,lc()("unscopables")),function(){if(sd)return cd;sd=1;var e=ki();fc()(e.JSON,"JSON",!0)}(),ud=La().Symbol)}var fd,pd,hd,gd,vd,md,yd,bd,Ed,wd,Cd,Dd,Ad,Sd,Od,xd,Nd,Bd,Td,kd,Fd,Id,Pd,Rd,_d,Ld,Md,jd,Hd,zd,$d,Ud,Vd,Wd={};function Gd(){return pd?fd:(pd=1,fd=function(){})}function qd(){return gd?hd:(gd=1,hd={})}function Kd(){if(md)return vd;md=1;var e=Vi(),t=Bs(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,o=t(n,"name"),i=o&&"something"===function(){}.name,a=o&&(!e||e&&r(n,"name").configurable);return vd={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function Yd(){return bd||(bd=1,yd=!Fi()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),yd}function Xd(){if(wd)return Ed;wd=1;var e=Bs(),t=Mi(),n=Ns(),r=Sl(),o=Yd(),i=r("IE_PROTO"),a=Object,s=a.prototype;return Ed=o?a.getPrototypeOf:function(r){var o=n(r);if(e(o,i))return o[i];var u=o.constructor;return t(u)&&o instanceof u?u.prototype:o instanceof a?s:null},Ed}function Zd(){if(Dd)return Cd;Dd=1;var e,t,n,r=Fi(),o=Mi(),i=_a(),a=Ol(),s=Xd(),u=Ul(),l=ks(),c=As(),d=l("iterator"),f=!1;return[].keys&&("next"in(n=[].keys())?(t=s(s(n)))!==Object.prototype&&(e=t):f=!0),!i(e)||r(function(){var t={};return e[d].call(t)!==t})?e={}:c&&(e=a(e)),o(e[d])||u(e,d,function(){return this}),Cd={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function Jd(){if(Sd)return Ad;Sd=1;var e=Zd().IteratorPrototype,t=Ol(),n=ka(),r=fc(),o=qd(),i=function(){return this};return Ad=function(a,s,u,l){var c=s+" Iterator";return a.prototype=t(e,{next:n(+!l,u)}),r(a,c,!1,!0),o[c]=i,a},Ad}function Qd(){if(xd)return Od;xd=1;var e=Ri(),t=Ga();return Od=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}function ef(){if(Bd)return Nd;Bd=1;var e=_a();return Nd=function(t){return e(t)||null===t}}function tf(){if(kd)return Td;kd=1;var e=ef(),t=String,n=TypeError;return Td=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function nf(){if(Id)return Fd;Id=1;var e=Qd(),t=_a(),n=Pa(),r=tf();return Fd=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,a={};try{(o=e(Object.prototype,"__proto__","set"))(a,[]),i=a instanceof Array}catch(e){}return function(e,a){return n(e),r(a),t(e)?(i?o(e,a):e.__proto__=a,e):e}}():void 0),Fd}function rf(){if(Rd)return Pd;Rd=1;var e=Tu(),t=Wi(),n=As(),r=Kd(),o=Mi(),i=Jd(),a=Xd(),s=nf(),u=fc(),l=Bu(),c=Ul(),d=ks(),f=qd(),p=Zd(),h=r.PROPER,g=r.CONFIGURABLE,v=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,y=d("iterator"),b="keys",E="values",w="entries",C=function(){return this};return Pd=function(r,d,p,D,A,S,O){i(p,d,D);var x,N,B,T=function(e){if(e===A&&R)return R;if(!m&&e&&e in I)return I[e];switch(e){case b:case E:case w:return function(){return new p(this,e)}}return function(){return new p(this)}},k=d+" Iterator",F=!1,I=r.prototype,P=I[y]||I["@@iterator"]||A&&I[A],R=!m&&P||T(A),_="Array"===d&&I.entries||P;if(_&&(x=a(_.call(new r)))!==Object.prototype&&x.next&&(n||a(x)===v||(s?s(x,v):o(x[y])||c(x,y,C)),u(x,k,!0,!0),n&&(f[k]=C)),h&&A===E&&P&&P.name!==E&&(!n&&g?l(I,"name",E):(F=!0,R=function(){return t(P,this)})),A)if(N={values:T(E),keys:S?R:T(b),entries:T(w)},O)for(B in N)(m||F||!(B in I))&&c(I,B,N[B]);else e({target:d,proto:!0,forced:m||F},N);return n&&!O||I[y]===R||c(I,y,R,{name:A}),f[d]=R,N},Pd}function of(){return Ld?_d:(Ld=1,_d=function(e,t){return{value:e,done:t}})}function af(){if(jd)return Md;jd=1;var e=Ra(),t=Gd(),n=qd(),r=hc(),o=Nu().f,i=rf(),a=of(),s=As(),u=Vi(),l="Array Iterator",c=r.set,d=r.getterFor(l);Md=i(Array,"Array",function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(n,!1);case"values":return a(t[n],!1)}return a([n,t[n]],!1)},"values");var f=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}return Md}function sf(){return zd?Hd:(zd=1,Hd={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0})}function uf(){if($d)return Wd;$d=1,af();var e=sf(),t=ki(),n=fc(),r=qd();for(var o in e)n(t[o],o),r[o]=r.Array;return Wd}function lf(){if(Vd)return Ud;Vd=1;var e=dd();return uf(),Ud=e}var cf,df={};var ff;var pf;var hf,gf,vf;function mf(){if(vf)return gf;vf=1;var e=lf();return function(){if(cf)return df;cf=1;var e=ks(),t=Nu().f,n=e("metadata"),r=Function.prototype;void 0===r[n]&&t(r,n,{value:null})}(),ff||(ff=1,Hc()),pf||(pf=1,Vc()),hf||(hf=1,lc()("metadata")),gf=e}var yf,bf,Ef;function wf(){if(bf)return yf;bf=1;var e=Ma(),t=Ri(),n=e("Symbol"),r=n.keyFor,o=t(n.prototype.valueOf);return yf=n.isRegisteredSymbol||function(e){try{return void 0!==r(o(e))}catch(e){return!1}}}var Cf,Df,Af;function Sf(){if(Df)return Cf;Df=1;for(var e=xs(),t=Ma(),n=Ri(),r=Va(),o=ks(),i=t("Symbol"),a=i.isWellKnownSymbol,s=t("Object","getOwnPropertyNames"),u=n(i.prototype.valueOf),l=e("wks"),c=0,d=s(i),f=d.length;c<f;c++)try{var p=d[c];r(i[p])&&o(p)}catch(e){}return Cf=function(e){if(a&&a(e))return!0;try{for(var t=u(e),n=0,r=s(l),o=r.length;n<o;n++)if(l[r[n]]==t)return!0}catch(e){}return!1},Cf}var Of;var xf;var Nf;var Bf;var Tf;var kf;var Ff;var If,Pf,Rf,_f,Lf;function Mf(){if(Rf)return Pf;Rf=1;var e=mf();return Ef||(Ef=1,Tu()({target:"Symbol",stat:!0},{isRegisteredSymbol:wf()})),Af||(Af=1,Tu()({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:Sf()})),Of||(Of=1,lc()("customMatcher")),xf||(xf=1,lc()("observable")),Nf||(Nf=1,Tu()({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:wf()})),Bf||(Bf=1,Tu()({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:Sf()})),Tf||(Tf=1,lc()("matcher")),kf||(kf=1,lc()("metadataKey")),Ff||(Ff=1,lc()("patternMatch")),If||(If=1,lc()("replaceAll")),Pf=e}function jf(){return Lf?_f:(Lf=1,_f=Mf())}var Hf,zf,$f,Uf,Vf,Wf,Gf,qf,Kf,Yf,Xf,Zf,Jf,Qf=b(jf()),ep={};function tp(){if(zf)return Hf;zf=1;var e=Ri(),t=Iu(),n=Xu(),r=Pa(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,d=n(r(s)),f=t(u),p=d.length;return f<0||f>=p?e?"":void 0:(l=i(d,f))<55296||l>56319||f+1===p||(c=i(d,f+1))<56320||c>57343?e?o(d,f):l:e?a(d,f,f+2):c-56320+(l-55296<<10)+65536}};return Hf={codeAt:s(!1),charAt:s(!0)}}function np(){return Vf?Uf:(Vf=1,af(),function(){if($f)return ep;$f=1;var e=tp().charAt,t=Xu(),n=hc(),r=rf(),o=of(),i="String Iterator",a=n.set,s=n.getterFor(i);r(String,"String",function(e){a(this,{type:i,string:t(e),index:0})},function(){var t,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(t=e(r,i),n.index+=t.length,o(t,!1))})}(),Yc(),Uf=uc().f("iterator"))}function rp(){if(Gf)return Wf;Gf=1;var e=np();return uf(),Wf=e}function op(){return Kf?qf:(Kf=1,qf=rp())}function ip(){return Xf?Yf:(Xf=1,Yf=op())}function ap(){return Jf?Zf:(Jf=1,Zf=ip())}var sp=b(ap());function up(e){return up="function"==typeof Qf&&"symbol"==typeof sp?function(e){return typeof e}:function(e){return e&&"function"==typeof Qf&&e.constructor===Qf&&e!==Qf.prototype?"symbol":typeof e},up(e)}var lp,cp={};if(function(){if(lp)return cp;lp=1;var e=fr(),t=w(),n=N(),r=gn().f,o=Se();e({target:"Object",stat:!0,forced:!o||t(function(){r(1)}),sham:!o},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}})}(),"object"===("undefined"==typeof global?"undefined":up(global))){var dp=Object.getOwnPropertyDescriptor(global,"window");global.window&&!dp.set||(global.window=global,global.requestAnimationFrame=function(){},global.navigator={userAgent:""},global.location={hostname:"0.0.0.0",port:0,protocol:"http:"},global.btoa=function(){},global.crypto={getRandomValues:function(e){return nodeCrypto.randomFillSync(e)}}),null!=global.document&&null==global.document.getElementsByTagName&&(global.document.getElementsByTagName=function(){return[]})}var fp={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var o=Cp.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},pp={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var o=wh.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},hp={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var o=Bp.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},gp=new WeakMap,vp=new WeakMap,mp=new WeakMap,yp=new WeakMap,bp=new WeakMap,Ep=new WeakMap,wp=new WeakMap,Cp={ancestors(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,r=Cp.levels(e,t);return r=n?r.slice(1):r.slice(0,-1)},common(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var o=e[r];if(o!==t[r])break;n.push(o)}return n},compare(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return Cp.equals(r,o)&&i>a},endsAt(e,t){var n=e.length,r=e.slice(0,n),o=t.slice(0,n);return Cp.equals(r,o)},endsBefore(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return Cp.equals(r,o)&&i<a},equals:(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),hasPrevious:e=>e[e.length-1]>0,isAfter:(e,t)=>1===Cp.compare(e,t),isAncestor:(e,t)=>e.length<t.length&&0===Cp.compare(e,t),isBefore:(e,t)=>-1===Cp.compare(e,t),isChild:(e,t)=>e.length===t.length+1&&0===Cp.compare(e,t),isCommon:(e,t)=>e.length<=t.length&&0===Cp.compare(e,t),isDescendant:(e,t)=>e.length>t.length&&0===Cp.compare(e,t),isParent:(e,t)=>e.length+1===t.length&&0===Cp.compare(e,t),isPath:e=>Array.isArray(e)&&e.every(e=>"number"==typeof e),isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&Cp.equals(n,r)},levels(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,r=[],o=0;o<=e.length;o++)r.push(e.slice(0,o));return n&&r.reverse(),r},next(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(0===e.length)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(0===e.length)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!Cp.isAncestor(t,e)&&!Cp.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return null;var r=[...e],{affinity:o="forward"}=n;if(0===e.length)return r;switch(t.type){case"insert_node":var{path:i}=t;(Cp.equals(i,r)||Cp.endsBefore(i,r)||Cp.isAncestor(i,r))&&(r[i.length-1]+=1);break;case"remove_node":var{path:a}=t;if(Cp.equals(a,r)||Cp.isAncestor(a,r))return null;Cp.endsBefore(a,r)&&(r[a.length-1]-=1);break;case"merge_node":var{path:s,position:u}=t;Cp.equals(s,r)||Cp.endsBefore(s,r)?r[s.length-1]-=1:Cp.isAncestor(s,r)&&(r[s.length-1]-=1,r[s.length]+=u);break;case"split_node":var{path:l,position:c}=t;if(Cp.equals(l,r)){if("forward"===o)r[r.length-1]+=1;else if("backward"!==o)return null}else Cp.endsBefore(l,r)?r[l.length-1]+=1:Cp.isAncestor(l,r)&&e[l.length]>=c&&(r[l.length-1]+=1,r[l.length]-=c);break;case"move_node":var{path:d,newPath:f}=t;if(Cp.equals(d,f))return r;if(Cp.isAncestor(d,r)||Cp.equals(d,r)){var p=f.slice();return Cp.endsBefore(d,f)&&d.length<f.length&&(p[d.length-1]-=1),p.concat(r.slice(d.length))}Cp.isSibling(d,f)&&(Cp.isAncestor(f,r)||Cp.equals(f,r))?Cp.endsBefore(d,r)?r[d.length-1]-=1:r[d.length-1]+=1:Cp.endsBefore(f,r)||Cp.equals(f,r)||Cp.isAncestor(f,r)?(Cp.endsBefore(d,r)&&(r[d.length-1]-=1),r[f.length-1]+=1):Cp.endsBefore(d,r)&&(Cp.equals(f,r)&&(r[f.length-1]+=1),r[d.length-1]-=1)}return r}};function Dp(e){return Dp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dp(e)}function Ap(e){var t=function(e,t){if("object"!==Dp(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==Dp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Dp(t)?t:String(t)}function Sp(e,t,n){return(t=Ap(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Op(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var xp=["anchor","focus"];function Np(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var Bp={edges(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,{anchor:r,focus:o}=e;return Bp.isBackward(e)===n?[r,o]:[o,r]},end(e){var[,t]=Bp.edges(e);return t},equals:(e,t)=>wh.equals(e.anchor,t.anchor)&&wh.equals(e.focus,t.focus),surrounds(e,t){var n=Bp.intersection(e,t);return!!n&&Bp.equals(n,t)},includes(e,t){if(yh.isRange(t)){if(Bp.includes(e,t.anchor)||Bp.includes(e,t.focus))return!0;var[n,r]=Bp.edges(e),[o,i]=Bp.edges(t);return wh.isBefore(n,o)&&wh.isAfter(r,i)}var[a,s]=Bp.edges(e),u=!1,l=!1;return yh.isPoint(t)?(u=wh.compare(t,a)>=0,l=wh.compare(t,s)<=0):(u=Cp.compare(t,a.path)>=0,l=Cp.compare(t,s.path)<=0),u&&l},intersection(e,t){var n=Op(e,xp),[r,o]=Bp.edges(e),[i,a]=Bp.edges(t),s=wh.isBefore(r,i)?i:r,u=wh.isBefore(o,a)?o:a;return wh.isBefore(u,s)?null:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Np(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Np(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({anchor:s,focus:u},n)},isBackward(e){var{anchor:t,focus:n}=e;return wh.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return wh.equals(t,n)},isExpanded:e=>!Bp.isCollapsed(e),isForward:e=>!Bp.isBackward(e),isRange:e=>zp(e)&&wh.isPoint(e.anchor)&&wh.isPoint(e.focus),*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=Bp.edges(e);return t},transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===e)return null;var r,o,{affinity:i="inward"}=n;if("inward"===i){var a=Bp.isCollapsed(e);Bp.isForward(e)?(r="forward",o=a?r:"backward"):(r="backward",o=a?r:"forward")}else"outward"===i?Bp.isForward(e)?(r="backward",o="forward"):(r="forward",o="backward"):(r=i,o=i);var s=wh.transform(e.anchor,t,{affinity:r}),u=wh.transform(e.focus,t,{affinity:o});return s&&u?{anchor:s,focus:u}:null}},Tp=function(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!zp(e)&&("function"!=typeof e.apply&&(t?_p.isNodeList(e.children):Array.isArray(e.children)))},kp={isAncestor(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return zp(e)&&_p.isNodeList(e.children,{deep:t})},isElement:Tp,isElementList(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Array.isArray(e)&&e.every(e=>kp.isElement(e,{deep:t}))},isElementProps:e=>void 0!==e.children,isElementType:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return Tp(e)&&e[n]===t},matches(e,t){for(var n in t)if("children"!==n&&e[n]!==t[n])return!1;return!0}},Fp=["text"],Ip=["children"];function Pp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pp(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var _p={ancestor(e,t){var n=_p.get(e,t);if(_p.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Dh.stringify(n)));return n},ancestors(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var r of Cp.ancestors(t,n)){var o=[_p.ancestor(e,r),r];yield o}}()},child(e,t){if(_p.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Dh.stringify(e)));var n=e.children[t];if(null==n)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Dh.stringify(e)));return n},children(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var{reverse:r=!1}=n,o=_p.ancestor(e,t),{children:i}=o,a=r?i.length-1:0;r?a>=0:a<i.length;){var s=_p.child(o,a),u=t.concat(a);yield[s,u],a=r?a-1:a+1}}()},common(e,t,n){var r=Cp.common(t,n);return[_p.get(e,r),r]},descendant(e,t){var n=_p.get(e,t);if(_p.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Dh.stringify(n)));return n},descendants(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[n,r]of _p.nodes(e,t))0!==r.length&&(yield[n,r])}()},elements(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[n,r]of _p.nodes(e,t))_p.isElement(n)&&(yield[n,r])}()},extractProps:e=>_p.isText(e)?Op(e,Fp):Op(e,Ip),first(e,t){for(var n=t.slice(),r=_p.get(e,n);r&&!_p.isText(r)&&0!==r.children.length;)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){var n={children:e.children},[r,o]=Bp.edges(t),i=_p.nodes(n,{reverse:!0,pass:e=>{var[,n]=e;return!Bp.includes(t,n)}}),a=function(){if(!Bp.includes(t,s)){var e=s[s.length-1];Rh(n,Cp.parent(s),t=>Ih(t,e,1))}Cp.equals(s,o.path)&&_h(n,s,e=>{var t=e.text.slice(0,o.offset);return Rp(Rp({},e),{},{text:t})}),Cp.equals(s,r.path)&&_h(n,s,e=>{var t=e.text.slice(r.offset);return Rp(Rp({},e),{},{text:t})})};for(var[,s]of i)a();return n.children},get(e,t){var n=_p.getIf(e,t);if(void 0===n)throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Dh.stringify(e)));return n},getIf(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(_p.isText(n)||!n.children[o])return;n=n.children[o]}return n},has(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(_p.isText(n)||!n.children[o])return!1;n=n.children[o]}return!0},isAncestor:e=>!_p.isText(e),isEditor:e=>"function"==typeof e.apply,isElement:e=>Array.isArray(e.children)&&"function"!=typeof e.apply,isNode(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Nh.isText(e)||kp.isElement(e,{deep:t})||mh.isEditor(e,{deep:t})},isNodeList(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Array.isArray(e)&&e.every(e=>_p.isNode(e,{deep:t}))},isText:e=>"string"==typeof e.text,last(e,t){for(var n=t.slice(),r=_p.get(e,n);r&&!_p.isText(r)&&0!==r.children.length;){var o=r.children.length-1;r=r.children[o],n.push(o)}return[r,n]},leaf(e,t){var n=_p.get(e,t);if(!_p.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Dh.stringify(n)));return n},levels(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var r of Cp.levels(t,n)){var o=_p.get(e,r);yield[o,r]}}()},matches:(e,t)=>_p.isElement(e)&&kp.isElementProps(t)&&kp.matches(e,t)||_p.isText(e)&&Nh.isTextProps(t)&&Nh.matches(e,t),nodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var{pass:n,reverse:r=!1}=t,{from:o=[],to:i}=t,a=new Set,s=[],u=e;!i||!(r?Cp.isBefore(s,i):Cp.isAfter(s,i));)if(a.has(u)||(yield[u,s]),a.has(u)||_p.isText(u)||0===u.children.length||null!=n&&!1!==n([u,s])){if(0===s.length)break;if(!r){var l=Cp.next(s);if(_p.has(e,l)){s=l,u=_p.get(e,s);continue}}if(r&&0!==s[s.length-1])s=Cp.previous(s),u=_p.get(e,s);else s=Cp.parent(s),u=_p.get(e,s),a.add(u)}else{a.add(u);var c=r?u.children.length-1:0;Cp.isAncestor(s,o)&&(c=o[s.length]),s=s.concat(c),u=_p.get(e,s)}}()},parent(e,t){var n=Cp.parent(t),r=_p.get(e,n);if(_p.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string:e=>_p.isText(e)?e.text:e.children.map(_p.string).join(""),texts(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[n,r]of _p.nodes(e,t))_p.isText(n)&&(yield[n,r])}()}};function Lp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lp(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var jp,Hp={isNodeOperation:e=>Hp.isOperation(e)&&e.type.endsWith("_node"),isOperation(e){if(!zp(e))return!1;switch(e.type){case"insert_node":case"remove_node":return Cp.isPath(e.path)&&_p.isNode(e.node);case"insert_text":case"remove_text":return"number"==typeof e.offset&&"string"==typeof e.text&&Cp.isPath(e.path);case"merge_node":return"number"==typeof e.position&&Cp.isPath(e.path)&&zp(e.properties);case"move_node":return Cp.isPath(e.path)&&Cp.isPath(e.newPath);case"set_node":return Cp.isPath(e.path)&&zp(e.properties)&&zp(e.newProperties);case"set_selection":return null===e.properties&&Bp.isRange(e.newProperties)||null===e.newProperties&&Bp.isRange(e.properties)||zp(e.properties)&&zp(e.newProperties);case"split_node":return Cp.isPath(e.path)&&"number"==typeof e.position&&zp(e.properties);default:return!1}},isOperationList:e=>Array.isArray(e)&&e.every(e=>Hp.isOperation(e)),isSelectionOperation:e=>Hp.isOperation(e)&&e.type.endsWith("_selection"),isTextOperation:e=>Hp.isOperation(e)&&e.type.endsWith("_text"),inverse(e){switch(e.type){case"insert_node":return Mp(Mp({},e),{},{type:"remove_node"});case"insert_text":return Mp(Mp({},e),{},{type:"remove_text"});case"merge_node":return Mp(Mp({},e),{},{type:"split_node",path:Cp.previous(e.path)});case"move_node":var{newPath:t,path:n}=e;if(Cp.equals(t,n))return e;if(Cp.isSibling(n,t))return Mp(Mp({},e),{},{path:t,newPath:n});var r=Cp.transform(n,e),o=Cp.transform(Cp.next(n),e);return Mp(Mp({},e),{},{path:r,newPath:o});case"remove_node":return Mp(Mp({},e),{},{type:"insert_node"});case"remove_text":return Mp(Mp({},e),{},{type:"insert_text"});case"set_node":var{properties:i,newProperties:a}=e;return Mp(Mp({},e),{},{properties:a,newProperties:i});case"set_selection":var{properties:s,newProperties:u}=e;return Mp(Mp({},e),{},null==s?{properties:u,newProperties:null}:null==u?{properties:null,newProperties:s}:{properties:u,newProperties:s});case"split_node":return Mp(Mp({},e),{},{type:"merge_node",path:Cp.next(e.path)})}}},zp=e=>"object"==typeof e&&null!==e,$p=(e,t)=>{for(var n in e){var r=e[n],o=t[n];if(Array.isArray(r)&&Array.isArray(o)){if(r.length!==o.length)return!1;for(var i=0;i<r.length;i++)if(r[i]!==o[i])return!1}else if(zp(r)&&zp(o)){if(!$p(r,o))return!1}else if(r!==o)return!1}for(var a in t)if(void 0===e[a]&&void 0!==t[a])return!1;return!0},Up=e=>e.selection?e.selection:e.children.length>0?mh.end(e,[]):[0],Vp=(e,t)=>{var[n]=mh.node(e,t);return e=>e===n},Wp=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!t,r=t?Zp(e):e,o=jp.None,i=jp.None,a=0,s=null;for(var u of r){var l=u.codePointAt(0);if(!l)break;var c=lh(u,l);if([o,i]=n?[i,c]:[c,o],ch(o,jp.ZWJ)&&ch(i,jp.ExtPict)&&!hh(n?e.substring(0,a):e.substring(0,e.length-a)))break;if(ch(o,jp.RI)&&ch(i,jp.RI)&&!(s=null!==s?!s:!!n||vh(e.substring(0,e.length-a))))break;if(o!==jp.None&&i!==jp.None&&fh(o,i))break;a+=u.length}return a||1},Gp=/\s/,qp=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,Kp=/['\u2018\u2019]/,Yp=(e,t,n)=>{if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},Xp=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Gp.test(t))return!1;if(Kp.test(t)){var o=Wp(n,r),[i,a]=Yp(n,o,r);if(e(i,a,r))return!0}return!qp.test(t)},Zp=function*(e){for(var t=e.length-1,n=0;n<e.length;n++){var r=e.charAt(t-n);if(Qp(r.charCodeAt(0))){var o=e.charAt(t-n-1);if(Jp(o.charCodeAt(0))){yield o+r,n++;continue}}yield r}},Jp=e=>e>=55296&&e<=56319,Qp=e=>e>=56320&&e<=57343;!function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"}(jp||(jp={}));var eh=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,th=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,nh=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,rh=/^[\u1100-\u115F\uA960-\uA97C]$/,oh=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,ih=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,ah=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,sh=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,uh=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,lh=(e,t)=>{var n=jp.Any;return-1!==e.search(eh)&&(n|=jp.Extend),8205===t&&(n|=jp.ZWJ),t>=127462&&t<=127487&&(n|=jp.RI),-1!==e.search(th)&&(n|=jp.Prepend),-1!==e.search(nh)&&(n|=jp.SpacingMark),-1!==e.search(rh)&&(n|=jp.L),-1!==e.search(oh)&&(n|=jp.V),-1!==e.search(ih)&&(n|=jp.T),-1!==e.search(ah)&&(n|=jp.LV),-1!==e.search(sh)&&(n|=jp.LVT),-1!==e.search(uh)&&(n|=jp.ExtPict),n};function ch(e,t){return 0!==(e&t)}var dh=[[jp.L,jp.L|jp.V|jp.LV|jp.LVT],[jp.LV|jp.V,jp.V|jp.T],[jp.LVT|jp.T,jp.T],[jp.Any,jp.Extend|jp.ZWJ],[jp.Any,jp.SpacingMark],[jp.Prepend,jp.Any],[jp.ZWJ,jp.ExtPict],[jp.RI,jp.RI]];function fh(e,t){return-1===dh.findIndex(n=>ch(e,n[0])&&ch(t,n[1]))}var ph=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,hh=e=>-1!==e.search(ph),gh=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,vh=e=>{var t=e.match(gh);return null!==t&&t[0].length/2%2==1},mh={above:(e,t)=>e.above(t),addMark(e,t,n){e.addMark(t,n)},after:(e,t,n)=>e.after(t,n),before:(e,t,n)=>e.before(t,n),deleteBackward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e,t){e.deleteFragment(t)},edges:(e,t)=>e.edges(t),elementReadOnly(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.elementReadOnly(t)},end:(e,t)=>e.end(t),first:(e,t)=>e.first(t),fragment:(e,t)=>e.fragment(t),hasBlocks:(e,t)=>e.hasBlocks(t),hasInlines:(e,t)=>e.hasInlines(t),hasPath:(e,t)=>e.hasPath(t),hasTexts:(e,t)=>e.hasTexts(t),insertBreak(e){e.insertBreak()},insertFragment(e,t,n){e.insertFragment(t,n)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock:(e,t)=>e.isBlock(t),isEdge:(e,t,n)=>e.isEdge(t,n),isEditor:function(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!zp(e))return!1;var n="function"==typeof e.above&&"function"==typeof e.addMark&&"function"==typeof e.after&&"function"==typeof e.apply&&"function"==typeof e.before&&"function"==typeof e.collapse&&"function"==typeof e.delete&&"function"==typeof e.deleteBackward&&"function"==typeof e.deleteForward&&"function"==typeof e.deleteFragment&&"function"==typeof e.deselect&&"function"==typeof e.edges&&"function"==typeof e.elementReadOnly&&"function"==typeof e.end&&"function"==typeof e.first&&"function"==typeof e.fragment&&"function"==typeof e.getDirtyPaths&&"function"==typeof e.getFragment&&"function"==typeof e.getMarks&&"function"==typeof e.hasBlocks&&"function"==typeof e.hasInlines&&"function"==typeof e.hasPath&&"function"==typeof e.hasTexts&&"function"==typeof e.insertBreak&&"function"==typeof e.insertFragment&&"function"==typeof e.insertNode&&"function"==typeof e.insertNodes&&"function"==typeof e.insertSoftBreak&&"function"==typeof e.insertText&&"function"==typeof e.isBlock&&"function"==typeof e.isEdge&&"function"==typeof e.isElementReadOnly&&"function"==typeof e.isEmpty&&"function"==typeof e.isEnd&&"function"==typeof e.isInline&&"function"==typeof e.isNormalizing&&"function"==typeof e.isSelectable&&"function"==typeof e.isStart&&"function"==typeof e.isVoid&&"function"==typeof e.last&&"function"==typeof e.leaf&&"function"==typeof e.levels&&"function"==typeof e.liftNodes&&"function"==typeof e.markableVoid&&"function"==typeof e.mergeNodes&&"function"==typeof e.move&&"function"==typeof e.moveNodes&&"function"==typeof e.next&&"function"==typeof e.node&&"function"==typeof e.nodes&&"function"==typeof e.normalize&&"function"==typeof e.normalizeNode&&"function"==typeof e.onChange&&"function"==typeof e.parent&&"function"==typeof e.path&&"function"==typeof e.pathRef&&"function"==typeof e.pathRefs&&"function"==typeof e.point&&"function"==typeof e.pointRef&&"function"==typeof e.pointRefs&&"function"==typeof e.positions&&"function"==typeof e.previous&&"function"==typeof e.range&&"function"==typeof e.rangeRef&&"function"==typeof e.rangeRefs&&"function"==typeof e.removeMark&&"function"==typeof e.removeNodes&&"function"==typeof e.select&&"function"==typeof e.setNodes&&"function"==typeof e.setNormalizing&&"function"==typeof e.setPoint&&"function"==typeof e.setSelection&&"function"==typeof e.shouldMergeNodesRemovePrevNode&&"function"==typeof e.shouldNormalize&&"function"==typeof e.splitNodes&&"function"==typeof e.start&&"function"==typeof e.string&&"function"==typeof e.unhangRange&&"function"==typeof e.unsetNodes&&"function"==typeof e.unwrapNodes&&"function"==typeof e.void&&"function"==typeof e.withoutNormalizing&&"function"==typeof e.wrapNodes&&(null===e.marks||zp(e.marks))&&(null===e.selection||Bp.isRange(e.selection))&&(t?_p.isNodeList(e.children)&&Hp.isOperationList(e.operations):Array.isArray(e.children)&&Array.isArray(e.operations));return n},isElementReadOnly:(e,t)=>e.isElementReadOnly(t),isEmpty:(e,t)=>e.isEmpty(t),isEnd:(e,t,n)=>e.isEnd(t,n),isInline:(e,t)=>e.isInline(t),isNormalizing:e=>e.isNormalizing(),isSelectable:(e,t)=>e.isSelectable(t),isStart:(e,t,n)=>e.isStart(t,n),isVoid:(e,t)=>e.isVoid(t),last:(e,t)=>e.last(t),leaf:(e,t,n)=>e.leaf(t,n),levels:(e,t)=>e.levels(t),marks:e=>e.getMarks(),next:(e,t)=>e.next(t),node:(e,t,n)=>e.node(t,n),nodes:(e,t)=>e.nodes(t),normalize(e,t){e.normalize(t)},parent:(e,t,n)=>e.parent(t,n),path:(e,t,n)=>e.path(t,n),pathRef:(e,t,n)=>e.pathRef(t,n),pathRefs:e=>e.pathRefs(),point:(e,t,n)=>e.point(t,n),pointRef:(e,t,n)=>e.pointRef(t,n),pointRefs:e=>e.pointRefs(),positions:(e,t)=>e.positions(t),previous:(e,t)=>e.previous(t),range:(e,t,n)=>e.range(t,n),rangeRef:(e,t,n)=>e.rangeRef(t,n),rangeRefs:e=>e.rangeRefs(),removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start:(e,t)=>e.start(t),string:(e,t,n)=>e.string(t,n),unhangRange:(e,t,n)=>e.unhangRange(t,n),void:(e,t)=>e.void(t),withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,n)=>e.shouldMergeNodesRemovePrevNode(t,n)},yh={isLocation:e=>Cp.isPath(e)||wh.isPoint(e)||Bp.isRange(e),isPath:e=>Array.isArray(e),isPoint:e=>"offset"in e,isRange:e=>"anchor"in e,isSpan:e=>Array.isArray(e)&&Array.isArray(e[0])};function bh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Eh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bh(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var wh={compare(e,t){var n=Cp.compare(e.path,t.path);return 0===n?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter:(e,t)=>1===wh.compare(e,t),isBefore:(e,t)=>-1===wh.compare(e,t),equals:(e,t)=>e.offset===t.offset&&Cp.equals(e.path,t.path),isPoint:e=>zp(e)&&"number"==typeof e.offset&&Cp.isPath(e.path),transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===e)return null;var{affinity:r="forward"}=n,{path:o,offset:i}=e;switch(t.type){case"insert_node":case"move_node":o=Cp.transform(o,t,n);break;case"insert_text":Cp.equals(t.path,o)&&(t.offset<i||t.offset===i&&"forward"===r)&&(i+=t.text.length);break;case"merge_node":Cp.equals(t.path,o)&&(i+=t.position),o=Cp.transform(o,t,n);break;case"remove_text":Cp.equals(t.path,o)&&t.offset<=i&&(i-=Math.min(i-t.offset,t.text.length));break;case"remove_node":if(Cp.equals(t.path,o)||Cp.isAncestor(t.path,o))return null;o=Cp.transform(o,t,n);break;case"split_node":if(Cp.equals(t.path,o)){if(t.position===i&&null==r)return null;(t.position<i||t.position===i&&"forward"===r)&&(i-=t.position,o=Cp.transform(o,t,Eh(Eh({},n),{},{affinity:"forward"})))}else o=Cp.transform(o,t,n);break;default:return e}return{path:o,offset:i}}},Ch=void 0,Dh={setScrubber(e){Ch=e},stringify:e=>JSON.stringify(e,Ch)},Ah=["text"],Sh=["anchor","focus","merge"];function Oh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oh(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Nh={equals(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{loose:r=!1}=n;function o(e){return Op(e,Ah)}return $p(r?o(e):e,r?o(t):t)},isText:e=>zp(e)&&"string"==typeof e.text,isTextList:e=>Array.isArray(e)&&e.every(e=>Nh.isText(e)),isTextProps:e=>void 0!==e.text,matches(e,t){for(var n in t)if("text"!==n&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[{leaf:xh({},e)}];for(var r of t){var{anchor:o,focus:i,merge:a}=r,s=Op(r,Sh),[u,l]=Bp.edges(r),c=[],d=0,f=u.offset,p=l.offset,h=null!=a?a:Object.assign;for(var{leaf:g}of n){var{length:v}=g.text,m=d;if(d+=v,f<=m&&d<=p)h(g,s),c.push({leaf:g});else if(f!==p&&(f===d||p===m)||f>d||p<m||p===m&&0!==m)c.push({leaf:g});else{var y=g,b=void 0,E=void 0;if(p<d){var w=p-m;E={leaf:xh(xh({},y),{},{text:y.text.slice(w)})},y=xh(xh({},y),{},{text:y.text.slice(0,w)})}if(f>m){var C=f-m;b={leaf:xh(xh({},y),{},{text:y.text.slice(0,C)})},y=xh(xh({},y),{},{text:y.text.slice(C)})}h(y,s),b&&c.push(b),c.push({leaf:y}),E&&c.push(E)}}n=c}if(n.length>1){var D=0;for(var[A,S]of n.entries()){var O=D,x=O+S.leaf.text.length,N={start:O,end:x};0===A&&(N.isFirst=!0),A===n.length-1&&(N.isLast=!0),S.position=N,D=x}}return n}};function Bh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Th(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bh(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var kh=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return[...e.slice(0,t),...r,...e.slice(t)]},Fh=function(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];return[...e.slice(0,t),...o,...e.slice(t+n)]},Ih=Fh,Ph=(e,t,n)=>{if(0===t.length)throw new Error("Cannot modify the editor");for(var r=_p.get(e,t),o=t.slice(),i=n(r);o.length>1;){var a=o.pop(),s=_p.get(e,o);i=Th(Th({},s),{},{children:Fh(s.children,a,1,i)})}var u=o.pop();e.children=Fh(e.children,u,1,i)},Rh=(e,t,n)=>{0===t.length?e.children=n(e.children):Ph(e,t,e=>{if(_p.isText(e))throw new Error("Cannot get the element at path [".concat(t,"] because it refers to a leaf node: ").concat(Dh.stringify(e)));return Th(Th({},e),{},{children:n(e.children)})})},_h=(e,t,n)=>Ph(e,t,e=>{if(!_p.isText(e))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Dh.stringify(e)));return n(e)});function Lh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lh(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var jh={transform(e,t){var n=!1;switch(t.type){case"insert_node":var{path:r,node:o}=t;Rh(e,Cp.parent(r),e=>{var t=r[r.length-1];if(t>e.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));return kh(e,t,o)}),n=!0;break;case"insert_text":var{path:i,offset:a,text:s}=t;if(0===s.length)break;_h(e,i,e=>{var t=e.text.slice(0,a),n=e.text.slice(a);return Mh(Mh({},e),{},{text:t+s+n})}),n=!0;break;case"merge_node":var{path:u}=t,l=u[u.length-1],c=Cp.previous(u),d=c[c.length-1];Rh(e,Cp.parent(u),e=>{var t,n=e[l],r=e[d];if(_p.isText(n)&&_p.isText(r))t=Mh(Mh({},r),{},{text:r.text+n.text});else{if(!_p.isElement(n)||!_p.isElement(r))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(u,"] to nodes of different interfaces: ").concat(Dh.stringify(n)," ").concat(Dh.stringify(r)));t=Mh(Mh({},r),{},{children:r.children.concat(n.children)})}return Fh(e,d,2,t)}),n=!0;break;case"move_node":var{path:f,newPath:p}=t,h=f[f.length-1];if(Cp.isAncestor(f,p))throw new Error("Cannot move a path [".concat(f,"] to new path [").concat(p,"] because the destination is inside itself."));var g=_p.get(e,f);Rh(e,Cp.parent(f),e=>Ih(e,h,1));var v=Cp.transform(f,t),m=v[v.length-1];Rh(e,Cp.parent(v),e=>kh(e,m,g)),n=!0;break;case"remove_node":var{path:y}=t,b=y[y.length-1];if(Rh(e,Cp.parent(y),e=>Ih(e,b,1)),e.selection){var E=Mh({},e.selection);for(var[w,C]of Bp.points(E)){var D=wh.transform(w,t);if(null!=E&&null!=D)E[C]=D;else{var A=void 0,S=void 0;for(var[O,x]of _p.texts(e)){if(-1!==Cp.compare(x,y)){S=[O,x];break}A=[O,x]}var N=!1;A&&S&&(N=!Cp.isSibling(A[1],y)&&(!!Cp.equals(S[1],y)||Cp.common(A[1],y).length<Cp.common(S[1],y).length)),A&&!N?E[C]={path:A[1],offset:A[0].text.length}:S?E[C]={path:S[1],offset:0}:E=null}}E&&Bp.equals(E,e.selection)||(e.selection=E)}break;case"remove_text":var{path:B,offset:T,text:k}=t;if(0===k.length)break;_h(e,B,e=>{var t=e.text.slice(0,T),n=e.text.slice(T+k.length);return Mh(Mh({},e),{},{text:t+n})}),n=!0;break;case"set_node":var{path:F,properties:I,newProperties:P}=t;if(0===F.length)throw new Error("Cannot set properties on the root node!");Ph(e,F,e=>{var t=Mh({},e);for(var n in P){if("children"===n||"text"===n)throw new Error('Cannot set the "'.concat(n,'" property of nodes!'));var r=P[n];null==r?delete t[n]:t[n]=r}for(var o in I)P.hasOwnProperty(o)||delete t[o];return t});break;case"set_selection":var{newProperties:R}=t;if(null==R){e.selection=null;break}if(null==e.selection){if(!R.anchor||!R.focus)throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Dh.stringify(R)," when there is no current selection."));e.selection=Mh({},R);break}var _=Mh({},e.selection);for(var L in R){var M=R[L];if(null==M){if("anchor"===L||"focus"===L)throw new Error('Cannot remove the "'.concat(L,'" selection property'));delete _[L]}else _[L]=M}e.selection=_;break;case"split_node":var{path:j,position:H,properties:z}=t,$=j[j.length-1];if(0===j.length)throw new Error('Cannot apply a "split_node" operation at path ['.concat(j,"] because the root node cannot be split."));Rh(e,Cp.parent(j),e=>{var t,n,r=e[$];if(_p.isText(r)){var o=r.text.slice(0,H),i=r.text.slice(H);t=Mh(Mh({},r),{},{text:o}),n=Mh(Mh({},z),{},{text:i})}else{var a=r.children.slice(0,H),s=r.children.slice(H);t=Mh(Mh({},r),{},{children:a}),n=Mh(Mh({},z),{},{children:s})}return Fh(e,$,1,t,n)}),n=!0}if(n&&e.selection){var U=Mh({},e.selection);for(var[V,W]of Bp.points(U))U[W]=wh.transform(V,t);Bp.equals(U,e.selection)||(e.selection=U)}}},Hh={insertNodes(e,t,n){e.insertNodes(t,n)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,n){e.setNodes(t,n)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,n){e.unsetNodes(t,n)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,n){e.wrapNodes(t,n)}},zh={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,n){e.setPoint(t,n)},setSelection(e,t){e.setSelection(t)}},$h={delete(e,t){e.delete(t)},insertFragment(e,t,n){e.insertFragment(t,n)},insertText(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};mh.withoutNormalizing(e,()=>{var{voids:r=!1}=n,{at:o=Up(e)}=n;if(yh.isPath(o)&&(o=mh.range(e,o)),yh.isRange(o))if(Bp.isCollapsed(o))o=o.anchor;else{var i=Bp.end(o);if(!r&&mh.void(e,{at:i}))return;var a=Bp.start(o),s=mh.pointRef(e,a),u=mh.pointRef(e,i);Wh.delete(e,{at:o,voids:r});var l=s.unref(),c=u.unref();o=l||c,Wh.setSelection(e,{anchor:o,focus:o})}if(!(!r&&mh.void(e,{at:o})||mh.elementReadOnly(e,{at:o}))){var{path:d,offset:f}=o;t.length>0&&e.apply({type:"insert_text",path:d,offset:f,text:t})}})}};function Uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Vh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uh(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Wh=Vh(Vh(Vh(Vh({},jh),Hh),zh),$h),Gh=new WeakMap;function qh(e,t,n){var r,o,i=gp.get(e)||[],a=vp.get(e)||new Set,s=e=>{if(e){var t=e.join(",");o.has(t)||(o.add(t),r.push(e))}};if(n)for(var u of(r=[],o=new Set,i)){s(n(u))}else r=i,o=a;for(var l of t)s(l);gp.set(e,r),vp.set(e,o)}var Kh=(e,t)=>{for(var n of mh.pathRefs(e))fp.transform(n,t);for(var r of mh.pointRefs(e))pp.transform(r,t);for(var o of mh.rangeRefs(e))hp.transform(o,t);if(!(e=>Gh.get(e)||!1)(e)){var i=Cp.operationCanTransformPath(t)?e=>Cp.transform(e,t):void 0;qh(e,e.getDirtyPaths(t),i)}Wh.transform(e,t),e.operations.push(t),mh.normalize(e,{operation:t}),"set_selection"===t.type&&(e.marks=null),mp.get(e)||(mp.set(e,!0),Promise.resolve().then(()=>{mp.set(e,!1),e.onChange({operation:t}),e.operations=[]}))};function Yh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yh(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Zh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Jh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zh(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qh(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ng(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tg(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function og(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rg(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ig(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var ag=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{selection:r,marks:o}=e;if(r){if(o){var i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ig(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ig(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({text:t},o);Wh.insertNodes(e,i,{at:n.at,voids:n.voids})}else Wh.insertText(e,t,n);e.marks=null}};var sg=["text"],ug=["text"];var lg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{force:n=!1,operation:r}=t,o=e=>gp.get(e)||[],i=e=>{var t=o(e).pop(),n=t.join(",");return(e=>vp.get(e)||new Set)(e).delete(n),t};if(mh.isNormalizing(e)){if(n){var a=Array.from(_p.nodes(e),e=>{var[,t]=e;return t}),s=new Set(a.map(e=>e.join(",")));gp.set(e,a),vp.set(e,s)}0!==o(e).length&&mh.withoutNormalizing(e,()=>{for(var t of o(e))if(_p.has(e,t)){var n=mh.node(e,t),[a,s]=n;_p.isElement(a)&&0===a.children.length&&e.normalizeNode(n,{operation:r})}for(var u=o(e),l=u.length,c=0;0!==u.length;){if(!e.shouldNormalize({dirtyPaths:u,iteration:c,initialDirtyPathsLength:l,operation:r}))return;var d=i(e);if(_p.has(e,d)){var f=mh.node(e,d);e.normalizeNode(f,{operation:r})}c++,u=o(e)}})}};function cg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var{at:n=e.selection,unit:r="offset",reverse:o=!1,voids:i=!1}=t;if(n){var a=mh.range(e,n),[s,u]=Bp.edges(a),l=o?u:s,c=!1,d="",f=0,p=0,h=0,g=[],v=function*(t){var n=g.some(e=>Cp.isAncestor(e,t));function*a(e){n||(yield e)}if(_p.isElement(m)){if(!e.isSelectable(m)){if(g.push(t),o)return Cp.hasPrevious(t)&&(yield*a(mh.end(e,Cp.previous(t)))),0;var v=Cp.next(t);return mh.hasPath(e,v)&&(yield*a(mh.start(e,v))),0}if(!i&&(e.isVoid(m)||e.isElementReadOnly(m)))return yield*a(mh.start(e,t)),0;if(e.isInline(m))return 0;if(mh.hasInlines(e,m)){var y=Cp.isAncestor(t,u.path)?u:mh.end(e,t),E=Cp.isAncestor(t,s.path)?s:mh.start(e,t);d=mh.string(e,{anchor:E,focus:y},{voids:i}),c=!0}}if(_p.isText(m)){var w=Cp.equals(t,l.path);for(w?(p=o?l.offset:m.text.length-l.offset,h=l.offset):(p=m.text.length,h=o?p:0),(w||c||"offset"===r)&&(yield*a({path:t,offset:h}),c=!1);;){if(0===f){if(""===d)break;f=b(d,r,o),d=Yp(d,f,o)[1]}if(h=o?h-f:h+f,(p-=f)<0){f=-p;break}f=0,yield*a({path:t,offset:h})}}};for(var[m,y]of mh.nodes(e,{at:n,reverse:o,voids:i}))yield*v(y)}function b(e,t,n){return"character"===t?Wp(e,n):"word"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,r=!1;e.length>0;){var o=Wp(e,t),[i,a]=Yp(e,o,t);if(Xp(i,a,t))r=!0,n+=o;else{if(r)break;n+=o}e=a}return n}(e,n):"line"===t||"block"===t?e.length:1}}()}function dg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var fg=(e,t)=>{var{selection:n}=e;if(n){var r=(t,n)=>{if(!_p.isText(t))return!1;var[r,o]=mh.parent(e,n);return!e.isVoid(r)||e.markableVoid(r)},o=Bp.isExpanded(n),i=!1;if(!o){var[a,s]=mh.node(e,n);if(a&&r(a,s)){var[u]=mh.parent(e,s);i=u&&e.markableVoid(u)}}if(o||i)Wh.unsetNodes(e,t,{match:r,split:!0,voids:!0});else{var l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dg(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},mh.marks(e)||{});delete l[t],e.marks=l,mp.get(e)||e.onChange()}}};function pg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pg(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var gg=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};mh.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:o=!1,mode:i="lowest",batchDirty:a=!0}=n,{at:s,match:u,select:l}=n;if(_p.isNode(t)&&(t=[t]),0!==t.length){var[c]=t;if(s||(s=Up(e),!1!==l&&(l=!0)),null==l&&(l=!1),yh.isRange(s))if(r||(s=mh.unhangRange(e,s,{voids:o})),Bp.isCollapsed(s))s=s.anchor;else{var[,d]=Bp.edges(s),f=mh.pointRef(e,d);Wh.delete(e,{at:s}),s=f.unref()}if(yh.isPoint(s)){null==u&&(u=_p.isText(c)?e=>_p.isText(e):e.isInline(c)?t=>_p.isText(t)||mh.isInline(e,t):t=>_p.isElement(t)&&mh.isBlock(e,t));var[p]=mh.nodes(e,{at:s.path,match:u,mode:i,voids:o});if(!p)return;var[,h]=p,g=mh.pathRef(e,h),v=mh.isEnd(e,s,h);Wh.splitNodes(e,{at:s,match:u,mode:i,voids:o});var m=g.unref();s=v?Cp.next(m):m}var y=Cp.parent(s),b=s[s.length-1];if(o||!mh.void(e,{at:y})){if(a){var E=[],w=Cp.levels(y);((e,t,n)=>{var r=Gh.get(e)||!1;Gh.set(e,!0);try{t(),n()}finally{Gh.set(e,r)}})(e,()=>{var n=function(){var t=y.concat(b);b++;var n={type:"insert_node",path:t,node:r};e.apply(n),s=Cp.next(s),E.push(n),_p.isText(r)?w.push(t):w.push(...Array.from(_p.nodes(r),e=>{var[,n]=e;return t.concat(n)}))};for(var r of t)n()},()=>{qh(e,w,e=>{var t=e;for(var n of E)if(Cp.operationCanTransformPath(n)&&!(t=Cp.transform(t,n)))return null;return t})})}else for(var C of t){var D=y.concat(b);b++,e.apply({type:"insert_node",path:D,node:C}),s=Cp.next(s)}if(s=Cp.previous(s),l){var A=mh.end(e,s);A&&Wh.select(e,A)}}}})},vg=["text"],mg=["children"],yg=(e,t)=>t!==e&&(_p.isText(t)||mh.isVoid(e,t)||1===t.children.length&&yg(e,t.children[0])),bg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};mh.withoutNormalizing(e,()=>{var{mode:n="lowest",voids:r=!1}=t,{match:o,at:i=e.selection,height:a=0,always:s=!1}=t;if(i&&(null==o&&(o=t=>_p.isElement(t)&&mh.isBlock(e,t)),!yh.isRange(i)||(i=((e,t)=>{if(Bp.isCollapsed(t))return t.anchor;var[,n]=Bp.edges(t),r=mh.pointRef(e,n);return Wh.delete(e,{at:t}),r.unref()})(e,i),i))){if(yh.isPath(i)){var u=i,l=mh.point(e,u),[c]=mh.parent(e,u);o=e=>e===c,a=l.path.length-u.length+1,i=l,s=!0}var d,f=mh.pointRef(e,i,{affinity:"backward"});try{var[p]=mh.nodes(e,{at:i,match:o,mode:n,voids:r});if(!p)return;var h=mh.void(e,{at:i,mode:"highest"});if(!r&&h){var[g,v]=h;if(e.isInline(g)){var m=mh.after(e,v);if(!m){var y=Cp.next(v);Wh.insertNodes(e,{text:""},{at:y,voids:r}),m=mh.point(e,y)}i=m,s=!0}a=i.path.length-v.length+1,s=!0}d=mh.pointRef(e,i);var b=i.path.length-a,[,E]=p,w=i.path.slice(0,b),C=0===a?i.offset:i.path[b]+0;for(var[D,A]of mh.levels(e,{at:w,reverse:!0,voids:r})){var S=!1;if(A.length<E.length||0===A.length||!r&&_p.isElement(D)&&mh.isVoid(e,D))break;var O=f.current,x=mh.isEnd(e,O,A);if(s||!f||!mh.isEdge(e,O,A)){S=!0;var N=_p.extractProps(D);e.apply({type:"split_node",path:A,position:C,properties:N})}C=A[A.length-1]+(S||x?1:0)}if(null==t.at){var B=d.current||mh.end(e,[]);Wh.select(e,B)}}finally{var T;f.unref(),null===(T=d)||void 0===T||T.unref()}}})};function Eg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Eg(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Eg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Cg=()=>{var e={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Kh(e,...n)},addMark:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t,n)=>{var{selection:r}=e;if(r){var o=(t,n)=>{if(!_p.isText(t))return!1;var[r,o]=mh.parent(e,n);return!e.isVoid(r)||e.markableVoid(r)},i=Bp.isExpanded(r),a=!1;if(!i){var[s,u]=mh.node(e,r);if(s&&o(s,u)){var[l]=mh.parent(e,u);a=l&&e.markableVoid(l)}}if(i||a)Wh.setNodes(e,{[t]:n},{match:o,split:!0,voids:!0});else{var c=Xh(Xh({},mh.marks(e)||{}),{},{[t]:n});e.marks=c,mp.get(e)||e.onChange()}}})(e,...n)},deleteBackward:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var{selection:n}=e;n&&Bp.isCollapsed(n)&&Wh.delete(e,{unit:t,reverse:!0})})(e,...n)},deleteForward:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var{selection:n}=e;n&&Bp.isCollapsed(n)&&Wh.delete(e,{unit:t})})(e,...n)},deleteFragment:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var{direction:t="forward"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{selection:n}=e;n&&Bp.isExpanded(n)&&Wh.delete(e,{reverse:"backward"===t})}(e,...n)},getFragment:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=>{var{selection:t}=e;return t?_p.fragment(e,t):[]})(e,...n)},insertBreak:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=>{Wh.splitNodes(e,{always:!0})})(e,...n)},insertSoftBreak:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=>{Wh.splitNodes(e,{always:!0})})(e,...n)},insertFragment:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};mh.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:o=!1}=n,{at:i=Up(e),batchDirty:a=!0}=n;if(t.length){if(yh.isRange(i))if(r||(i=mh.unhangRange(e,i,{voids:o})),Bp.isCollapsed(i))i=i.anchor;else{var[,s]=Bp.edges(i);if(!o&&mh.void(e,{at:s}))return;var u=mh.pointRef(e,s);Wh.delete(e,{at:i}),i=u.unref()}else yh.isPath(i)&&(i=mh.start(e,i));if(o||!mh.void(e,{at:i})){var l=mh.above(e,{at:i,match:t=>_p.isElement(t)&&mh.isInline(e,t),mode:"highest",voids:o});if(l){var[,c]=l;mh.isEnd(e,i,c)?i=mh.after(e,c):mh.isStart(e,i,c)&&(i=mh.before(e,c))}var d=mh.above(e,{match:t=>_p.isElement(t)&&mh.isBlock(e,t),at:i,voids:o}),[,f]=d,p=mh.isStart(e,i,f),h=mh.isEnd(e,i,f),g=p&&h,[,v]=_p.first({children:t},[]),[,m]=_p.last({children:t},[]),y=t=>{var[n,r]=t;return!(0===r.length||!g&&(!p&&Cp.isAncestor(r,v)&&_p.isElement(n)&&!e.isVoid(n)&&!e.isInline(n)||!h&&Cp.isAncestor(r,m)&&_p.isElement(n)&&!e.isVoid(n)&&!e.isInline(n)))},b=!0,E=[],w=[],C=[];for(var D of _p.nodes({children:t},{pass:y})){var[A,S]=D;b&&_p.isElement(A)&&!e.isInline(A)&&!Cp.isAncestor(S,v)&&(b=!1),y(D)&&(_p.isElement(A)&&!e.isInline(A)?(b=!1,w.push(A)):b?E.push(A):C.push(A))}var[O]=mh.nodes(e,{at:i,match:t=>_p.isText(t)||mh.isInline(e,t),mode:"highest",voids:o}),[,x]=O,N=mh.isStart(e,i,x),B=mh.isEnd(e,i,x),T=mh.pathRef(e,h&&!C.length?Cp.next(f):f),k=mh.pathRef(e,B?Cp.next(x):x),F=C.length>0;Wh.splitNodes(e,{at:i,match:t=>F?_p.isElement(t)&&mh.isBlock(e,t):_p.isText(t)||mh.isInline(e,t),mode:F?"lowest":"highest",always:F&&(!p||E.length>0)&&(!h||C.length>0),voids:o});var I,P=mh.pathRef(e,!N||N&&B?Cp.next(x):x);if(Wh.insertNodes(e,E,{at:P.current,match:t=>_p.isText(t)||mh.isInline(e,t),mode:"highest",voids:o,batchDirty:a}),g&&!E.length&&w.length&&!C.length&&Wh.delete(e,{at:f,voids:o}),Wh.insertNodes(e,w,{at:T.current,match:t=>_p.isElement(t)&&mh.isBlock(e,t),mode:"lowest",voids:o,batchDirty:a}),Wh.insertNodes(e,C,{at:k.current,match:t=>_p.isText(t)||mh.isInline(e,t),mode:"highest",voids:o,batchDirty:a}),!n.at&&(C.length>0&&k.current?I=Cp.previous(k.current):w.length>0&&T.current?I=Cp.previous(T.current):P.current&&(I=Cp.previous(P.current)),I)){var R=mh.end(e,I);Wh.select(e,R)}P.unref(),T.unref(),k.unref()}}})}(e,...n)},insertNode:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t,n)=>{Wh.insertNodes(e,t,n)})(e,...n)},insertText:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ag(e,...n)},normalizeNode:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t,n)=>{var[r,o]=t;if(!_p.isText(r)){"children"in r||(r.children=[]);var i=r;if(i!==e&&0===i.children.length&&(Wh.insertNodes(e,{text:""},{at:o.concat(0),voids:!0}),i=_p.get(e,o)),i!==e&&(e.isInline(i)||_p.isText(i.children[0])||e.isInline(i.children[0])))for(var a=0;a<i.children.length;a++){var s=i.children[a],u=i.children[a-1];_p.isText(s)?null!=u&&_p.isText(u)&&(""===s.text?(Wh.removeNodes(e,{at:o.concat(a),voids:!0}),i=_p.get(e,o),a--):""===u.text?(Wh.removeNodes(e,{at:o.concat(a-1),voids:!0}),i=_p.get(e,o),a--):Nh.equals(s,u,{loose:!0})&&(Wh.mergeNodes(e,{at:o.concat(a),voids:!0}),i=_p.get(e,o),a--)):e.isInline(s)?(null!=u&&_p.isText(u)||(Wh.insertNodes(e,{text:""},{at:o.concat(a),voids:!0}),i=_p.get(e,o),a++),a===i.children.length-1&&(Wh.insertNodes(e,{text:""},{at:o.concat(a+1),voids:!0}),i=_p.get(e,o),a++)):(Wh.unwrapNodes(e,{at:o.concat(a),voids:!0}),i=_p.get(e,o),a--)}else for(var l=0;l<i.children.length;l++){var c=i.children[l];(_p.isText(c)||e.isInline(c))&&(null!=n&&n.fallbackElement?Wh.wrapNodes(e,n.fallbackElement(),{at:o.concat(l),voids:!0}):Wh.removeNodes(e,{at:o.concat(l),voids:!0}),i=_p.get(e,o),l--)}}})(e,...n)},removeMark:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return fg(e,...n)},getDirtyPaths:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":var{path:n}=t;return Cp.levels(n);case"insert_node":var{node:r,path:o}=t,i=Cp.levels(o),a=_p.isText(r)?[]:Array.from(_p.nodes(r),e=>{var[,t]=e;return o.concat(t)});return[...i,...a];case"merge_node":var{path:s}=t;return[...Cp.ancestors(s),Cp.previous(s)];case"move_node":var{path:u,newPath:l}=t;if(Cp.equals(u,l))return[];var c=[],d=[];for(var f of Cp.ancestors(u)){var p=Cp.transform(f,t);c.push(p)}for(var h of Cp.ancestors(l)){var g=Cp.transform(h,t);d.push(g)}var v=d[d.length-1],m=l[l.length-1],y=v.concat(m);return[...c,...d,y];case"remove_node":var{path:b}=t;return[...Cp.ancestors(b)];case"split_node":var{path:E}=t;return[...Cp.levels(E),Cp.next(E)];default:return[]}})(e,...n)},shouldNormalize:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var{iteration:n,initialDirtyPathsLength:r}=t,o=42*r;if(n>o)throw new Error("Could not completely normalize the editor after ".concat(o," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0})(e,...n)},above:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{voids:n=!1,mode:r="lowest",at:o=e.selection,match:i}=t;if(o){var a=mh.path(e,o);if(!yh.isRange(o)||Cp.equals(o.focus.path,o.anchor.path)){if(0===a.length)return;a=Cp.parent(a)}var s="lowest"===r,[u]=mh.levels(e,{at:a,voids:n,match:i,reverse:s});return u}}(e,...n)},after:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={anchor:mh.point(e,t,{edge:"end"}),focus:mh.end(e,[])},{distance:i=1}=r,a=0;for(var s of mh.positions(e,Jh(Jh({},r),{},{at:o}))){if(a>i)break;0!==a&&(n=s),a++}return n}(e,...n)},before:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={anchor:mh.start(e,[]),focus:mh.point(e,t,{edge:"start"})},{distance:i=1}=r,a=0;for(var s of mh.positions(e,eg(eg({},r),{},{at:o,reverse:!0}))){if(a>i)break;0!==a&&(n=s),a++}return n}(e,...n)},collapse:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{edge:n="anchor"}=t,{selection:r}=e;if(r)if("anchor"===n)Wh.select(e,r.anchor);else if("focus"===n)Wh.select(e,r.focus);else if("start"===n){var[o]=Bp.edges(r);Wh.select(e,o)}else if("end"===n){var[,i]=Bp.edges(r);Wh.select(e,i)}}(e,...n)},delete:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};mh.withoutNormalizing(e,()=>{var n,r,{reverse:o=!1,unit:i="character",distance:a=1,voids:s=!1}=t,{at:u=e.selection,hanging:l=!1}=t;if(u){var c=!1;if(yh.isRange(u)&&Bp.isCollapsed(u)&&(c=!0,u=u.anchor),yh.isPoint(u)){var d=mh.void(e,{at:u,mode:"highest"});if(!s&&d){var[,f]=d;u=f}else{var p={unit:i,distance:a};u={anchor:u,focus:o?mh.before(e,u,p)||mh.start(e,[]):mh.after(e,u,p)||mh.end(e,[])},l=!0}}if(yh.isPath(u))Wh.removeNodes(e,{at:u,voids:s});else if(!Bp.isCollapsed(u)){if(!l){var[,h]=Bp.edges(u),g=mh.end(e,[]);wh.equals(h,g)||(u=mh.unhangRange(e,u,{voids:s}))}var[v,m]=Bp.edges(u),y=mh.above(e,{match:t=>_p.isElement(t)&&mh.isBlock(e,t),at:v,voids:s}),b=mh.above(e,{match:t=>_p.isElement(t)&&mh.isBlock(e,t),at:m,voids:s}),E=y&&b&&!Cp.equals(y[1],b[1]),w=Cp.equals(v.path,m.path),C=s?null:null!==(n=mh.void(e,{at:v,mode:"highest"}))&&void 0!==n?n:mh.elementReadOnly(e,{at:v,mode:"highest"}),D=s?null:null!==(r=mh.void(e,{at:m,mode:"highest"}))&&void 0!==r?r:mh.elementReadOnly(e,{at:m,mode:"highest"});if(C){var A=mh.before(e,v);A&&y&&Cp.isAncestor(y[1],A.path)&&(v=A)}if(D){var S=mh.after(e,m);S&&b&&Cp.isAncestor(b[1],S.path)&&(m=S)}var O,x=[];for(var N of mh.nodes(e,{at:u,voids:s})){var[B,T]=N;O&&0===Cp.compare(T,O)||(!s&&_p.isElement(B)&&(mh.isVoid(e,B)||mh.isElementReadOnly(e,B))||!Cp.isCommon(T,v.path)&&!Cp.isCommon(T,m.path))&&(x.push(N),O=T)}var k=Array.from(x,t=>{var[,n]=t;return mh.pathRef(e,n)}),F=mh.pointRef(e,v),I=mh.pointRef(e,m),P="";if(!w&&!C){var R=F.current,[_]=mh.leaf(e,R),{path:L}=R,{offset:M}=v,j=_.text.slice(M);j.length>0&&(e.apply({type:"remove_text",path:L,offset:M,text:j}),P=j)}if(k.reverse().map(e=>e.unref()).filter(e=>null!==e).forEach(t=>Wh.removeNodes(e,{at:t,voids:s})),!D){var H=I.current,[z]=mh.leaf(e,H),{path:$}=H,U=w?v.offset:0,V=z.text.slice(U,m.offset);V.length>0&&(e.apply({type:"remove_text",path:$,offset:U,text:V}),P=V)}!w&&E&&I.current&&F.current&&Wh.mergeNodes(e,{at:I.current,hanging:!0,voids:s}),c&&o&&"character"===i&&P.length>1&&P.match(/[\u0980-\u09FF\u0E00-\u0E7F\u1000-\u109F\u0900-\u097F\u1780-\u17FF\u0D00-\u0D7F\u0B00-\u0B7F\u0A00-\u0A7F\u0B80-\u0BFF\u0C00-\u0C7F]+/)&&Wh.insertText(e,P.slice(0,P.length-a));var W=F.unref(),G=I.unref(),q=o?W||G:G||W;null==t.at&&q&&Wh.select(e,q)}}})}(e,...n)},deselect:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})})(e,...n)},edges:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>[mh.start(e,t),mh.end(e,t)])(e,...n)},elementReadOnly:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return mh.above(e,ng(ng({},t),{},{match:t=>_p.isElement(t)&&mh.isElementReadOnly(e,t)}))}(e,...n)},end:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>mh.point(e,t,{edge:"end"}))(e,...n)},first:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var n=mh.path(e,t,{edge:"start"});return mh.node(e,n)})(e,...n)},fragment:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var n=mh.range(e,t);return _p.fragment(e,n)})(e,...n)},getMarks:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var{marks:t,selection:n}=e;if(!n)return null;var{anchor:r,focus:o}=n;if(t)return t;if(Bp.isExpanded(n)){if(Bp.isBackward(n)&&([o,r]=[r,o]),mh.isEnd(e,r,r.path)){var i=mh.after(e,r);i&&(r=i)}var[a]=mh.nodes(e,{match:_p.isText,at:{anchor:r,focus:o}});if(a){var[s]=a;return Op(s,sg)}return{}}var{path:u}=r,[l]=mh.leaf(e,u);if(0===r.offset){var c=mh.previous(e,{at:u,match:_p.isText}),d=mh.above(e,{match:t=>_p.isElement(t)&&mh.isVoid(e,t)&&e.markableVoid(t)});if(!d){var f=mh.above(e,{match:t=>_p.isElement(t)&&mh.isBlock(e,t)});if(c&&f){var[p,h]=c,[,g]=f;Cp.isAncestor(g,h)&&(l=p)}}}return Op(l,ug)}(e,...n)},hasBlocks:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>t.children.some(t=>_p.isElement(t)&&mh.isBlock(e,t)))(e,...n)},hasInlines:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>t.children.some(t=>_p.isText(t)||mh.isInline(e,t)))(e,...n)},hasPath:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>_p.has(e,t))(e,...n)},hasTexts:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>t.children.every(e=>_p.isText(e)))(e,...n)},insertNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return gg(e,...n)},isBlock:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>!e.isInline(t))(e,...n)},isEdge:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t,n)=>mh.isStart(e,t,n)||mh.isEnd(e,t,n))(e,...n)},isEmpty:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var{children:n}=t,[r]=n;return 0===n.length||1===n.length&&_p.isText(r)&&""===r.text&&!e.isVoid(t)})(e,...n)},isEnd:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t,n)=>{var r=mh.end(e,n);return wh.equals(t,r)})(e,...n)},isNormalizing:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=>{var t=yp.get(e);return void 0===t||t})(e,...n)},isStart:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t,n)=>{if(0!==t.offset)return!1;var r=mh.start(e,n);return wh.equals(t,r)})(e,...n)},last:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var n=mh.path(e,t,{edge:"end"});return mh.node(e,n)})(e,...n)},leaf:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=mh.path(e,t,n);return[_p.leaf(e,r),r]}(e,...n)},levels:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var{at:n=e.selection,reverse:r=!1,voids:o=!1}=t,{match:i}=t;if(null==i&&(i=()=>!0),n){var a=[],s=mh.path(e,n);for(var[u,l]of _p.levels(e,s))if(i(u,l)&&(a.push([u,l]),!o&&_p.isElement(u)&&mh.isVoid(e,u)))break;r&&a.reverse(),yield*a}}()}(e,...n)},liftNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};mh.withoutNormalizing(e,()=>{var{at:n=e.selection,mode:r="lowest",voids:o=!1}=t,{match:i}=t;if(n){null==i&&(i=yh.isPath(n)?Vp(e,n):t=>_p.isElement(t)&&mh.isBlock(e,t));var a=mh.nodes(e,{at:n,match:i,mode:r,voids:o}),s=Array.from(a,t=>{var[,n]=t;return mh.pathRef(e,n)});for(var u of s){var l=u.unref();if(l.length<2)throw new Error("Cannot lift node at a path [".concat(l,"] because it has a depth of less than `2`."));var c=mh.node(e,Cp.parent(l)),[d,f]=c,p=l[l.length-1],{length:h}=d.children;if(1===h){var g=Cp.next(f);Wh.moveNodes(e,{at:l,to:g,voids:o}),Wh.removeNodes(e,{at:f,voids:o})}else if(0===p)Wh.moveNodes(e,{at:l,to:f,voids:o});else if(p===h-1){var v=Cp.next(f);Wh.moveNodes(e,{at:l,to:v,voids:o})}else{var m=Cp.next(l),y=Cp.next(f);Wh.splitNodes(e,{at:m,voids:o}),Wh.moveNodes(e,{at:l,to:y,voids:o})}}}})}(e,...n)},mergeNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};mh.withoutNormalizing(e,()=>{var{match:n,at:r=e.selection}=t,{hanging:o=!1,voids:i=!1,mode:a="lowest"}=t;if(r){if(null==n)if(yh.isPath(r)){var[s]=mh.parent(e,r);n=e=>s.children.includes(e)}else n=t=>_p.isElement(t)&&mh.isBlock(e,t);if(!o&&yh.isRange(r)&&(r=mh.unhangRange(e,r,{voids:i})),yh.isRange(r))if(Bp.isCollapsed(r))r=r.anchor;else{var[,u]=Bp.edges(r),l=mh.pointRef(e,u);Wh.delete(e,{at:r}),r=l.unref(),null==t.at&&Wh.select(e,r)}var[c]=mh.nodes(e,{at:r,match:n,voids:i,mode:a}),d=mh.previous(e,{at:r,match:n,voids:i,mode:a});if(c&&d){var[f,p]=c,[h,g]=d;if(0!==p.length&&0!==g.length){var v,m,y=Cp.next(g),b=Cp.common(p,g),E=Cp.isSibling(p,g),w=Array.from(mh.levels(e,{at:p}),e=>{var[t]=e;return t}).slice(b.length).slice(0,-1),C=mh.above(e,{at:p,mode:"highest",match:t=>w.includes(t)&&yg(e,t)}),D=C&&mh.pathRef(e,C[1]);if(_p.isText(f)&&_p.isText(h)){var A=Op(f,vg);m=h.text.length,v=A}else{if(!_p.isElement(f)||!_p.isElement(h))throw new Error("Cannot merge the node at path [".concat(p,"] with the previous sibling because it is not the same kind: ").concat(Dh.stringify(f)," ").concat(Dh.stringify(h)));A=Op(f,mg),m=h.children.length,v=A}E||Wh.moveNodes(e,{at:p,to:y,voids:i}),D&&Wh.removeNodes(e,{at:D.current,voids:i}),mh.shouldMergeNodesRemovePrevNode(e,d,c)?Wh.removeNodes(e,{at:g,voids:i}):e.apply({type:"merge_node",path:y,position:m,properties:v}),D&&D.unref()}}}})}(e,...n)},move:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{selection:n}=e,{distance:r=1,unit:o="character",reverse:i=!1}=t,{edge:a=null}=t;if(n){"start"===a&&(a=Bp.isBackward(n)?"focus":"anchor"),"end"===a&&(a=Bp.isBackward(n)?"anchor":"focus");var{anchor:s,focus:u}=n,l={distance:r,unit:o},c={};if(null==a||"anchor"===a){var d=i?mh.before(e,s,l):mh.after(e,s,l);d&&(c.anchor=d)}if(null==a||"focus"===a){var f=i?mh.before(e,u,l):mh.after(e,u,l);f&&(c.focus=f)}Wh.setSelection(e,c)}}(e,...n)},moveNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{mh.withoutNormalizing(e,()=>{var{to:n,at:r=e.selection,mode:o="lowest",voids:i=!1}=t,{match:a}=t;if(r){null==a&&(a=yh.isPath(r)?Vp(e,r):t=>_p.isElement(t)&&mh.isBlock(e,t));var s=mh.pathRef(e,n),u=mh.nodes(e,{at:r,match:a,mode:o,voids:i}),l=Array.from(u,t=>{var[,n]=t;return mh.pathRef(e,n)});for(var c of l){var d=c.unref(),f=s.current;0!==d.length&&e.apply({type:"move_node",path:d,newPath:f}),s.current&&Cp.isSibling(f,d)&&Cp.isAfter(f,d)&&(s.current=Cp.next(s.current))}s.unref()}})})(e,...n)},next:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:o,at:i=e.selection}=t;if(i){var a=mh.after(e,i,{voids:r});if(a){var[,s]=mh.last(e,[]),u=[a.path,s];if(yh.isPath(i)&&0===i.length)throw new Error("Cannot get the next node from the root node!");if(null==o)if(yh.isPath(i)){var[l]=mh.parent(e,i);o=e=>l.children.includes(e)}else o=()=>!0;var[c]=mh.nodes(e,{at:u,match:o,mode:n,voids:r});return c}}}(e,...n)},node:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=mh.path(e,t,n),o=_p.get(e,r);return[o,r]}(e,...n)},nodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var{at:n=e.selection,mode:r="all",universal:o=!1,reverse:i=!1,voids:a=!1,pass:s}=t,{match:u}=t;if(u||(u=()=>!0),n){var l,c;if(yh.isSpan(n))l=n[0],c=n[1];else{var d=mh.path(e,n,{edge:"start"}),f=mh.path(e,n,{edge:"end"});l=i?f:d,c=i?d:f}var p,h=_p.nodes(e,{reverse:i,from:l,to:c,pass:t=>{var[n,r]=t;return!(!s||!s([n,r]))||!!_p.isElement(n)&&!(a||!mh.isVoid(e,n)&&!mh.isElementReadOnly(e,n))}}),g=[];for(var[v,m]of h){var y=p&&0===Cp.compare(m,p[1]);if("highest"!==r||!y)if(u(v,m))if("lowest"===r&&y)p=[v,m];else{var b="lowest"===r?p:[v,m];b&&(o?g.push(b):yield b),p=[v,m]}else if(o&&!y&&_p.isText(v))return}"lowest"===r&&p&&(o?g.push(p):yield p),o&&(yield*g)}}()}(e,...n)},normalize:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return lg(e,...n)},parent:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=mh.path(e,t,n),o=Cp.parent(r);return mh.node(e,o)}(e,...n)},path:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{depth:r,edge:o}=n;if(yh.isPath(t))if("start"===o){var[,i]=_p.first(e,t);t=i}else if("end"===o){var[,a]=_p.last(e,t);t=a}return yh.isRange(t)&&(t="start"===o?Bp.start(t):"end"===o?Bp.end(t):Cp.common(t.anchor.path,t.focus.path)),yh.isPoint(t)&&(t=t.path),null!=r&&(t=t.slice(0,r)),t}(e,...n)},pathRef:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,o={current:t,affinity:r,unref(){var{current:t}=o;return mh.pathRefs(e).delete(o),o.current=null,t}};return mh.pathRefs(e).add(o),o}(e,...n)},pathRefs:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=>{var t=bp.get(e);return t||(t=new Set,bp.set(e,t)),t})(e,...n)},point:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{edge:r="start"}=n;if(yh.isPath(t)){var o;if("end"===r){var[,i]=_p.last(e,t);o=i}else{var[,a]=_p.first(e,t);o=a}var s=_p.get(e,o);if(!_p.isText(s))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(t,"] because it has no ").concat(r," text node."));return{path:o,offset:"end"===r?s.text.length:0}}if(yh.isRange(t)){var[u,l]=Bp.edges(t);return"start"===r?u:l}return t}(e,...n)},pointRef:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,o={current:t,affinity:r,unref(){var{current:t}=o;return mh.pointRefs(e).delete(o),o.current=null,t}};return mh.pointRefs(e).add(o),o}(e,...n)},pointRefs:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=>{var t=Ep.get(e);return t||(t=new Set,Ep.set(e,t)),t})(e,...n)},positions:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return cg(e,...n)},previous:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:o,at:i=e.selection}=t;if(i){var a=mh.before(e,i,{voids:r});if(a){var[,s]=mh.first(e,[]),u=[a.path,s];if(yh.isPath(i)&&0===i.length)throw new Error("Cannot get the previous node from the root node!");if(null==o)if(yh.isPath(i)){var[l]=mh.parent(e,i);o=e=>l.children.includes(e)}else o=()=>!0;var[c]=mh.nodes(e,{reverse:!0,at:u,match:o,mode:n,voids:r});return c}}}(e,...n)},range:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t,n)=>yh.isRange(t)&&!n?t:{anchor:mh.start(e,t),focus:mh.end(e,n||t)})(e,...n)},rangeRef:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,o={current:t,affinity:r,unref(){var{current:t}=o;return mh.rangeRefs(e).delete(o),o.current=null,t}};return mh.rangeRefs(e).add(o),o}(e,...n)},rangeRefs:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=>{var t=wp.get(e);return t||(t=new Set,wp.set(e,t)),t})(e,...n)},removeNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};mh.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:r=!1,mode:o="lowest"}=t,{at:i=e.selection,match:a}=t;if(i){null==a&&(a=yh.isPath(i)?Vp(e,i):t=>_p.isElement(t)&&mh.isBlock(e,t)),!n&&yh.isRange(i)&&(i=mh.unhangRange(e,i,{voids:r}));var s=mh.nodes(e,{at:i,match:a,mode:o,voids:r}),u=Array.from(s,t=>{var[,n]=t;return mh.pathRef(e,n)});for(var l of u){var c=l.unref();if(c){var[d]=mh.node(e,c);e.apply({type:"remove_node",path:c,node:d})}}}})}(e,...n)},select:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var{selection:n}=e;if(t=mh.range(e,t),n)Wh.setSelection(e,t);else{if(!yh.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(Dh.stringify(t)));e.apply({type:"set_selection",properties:n,newProperties:t})}})(e,...n)},setNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};mh.withoutNormalizing(e,()=>{var{match:r,at:o=e.selection,compare:i,merge:a}=n,{hanging:s=!1,mode:u="lowest",split:l=!1,voids:c=!1}=n;if(o){if(null==r&&(r=yh.isPath(o)?Vp(e,o):t=>_p.isElement(t)&&mh.isBlock(e,t)),!s&&yh.isRange(o)&&(o=mh.unhangRange(e,o,{voids:c})),l&&yh.isRange(o)){if(Bp.isCollapsed(o)&&mh.leaf(e,o.anchor)[0].text.length>0)return;var d=mh.rangeRef(e,o,{affinity:"inward"}),[f,p]=Bp.edges(o),h="lowest"===u?"lowest":"highest",g=mh.isEnd(e,p,p.path);Wh.splitNodes(e,{at:p,match:r,mode:h,voids:c,always:!g});var v=mh.isStart(e,f,f.path);Wh.splitNodes(e,{at:f,match:r,mode:h,voids:c,always:!v}),o=d.unref(),null==n.at&&Wh.select(e,o)}for(var[m,y]of(i||(i=(e,t)=>e!==t),mh.nodes(e,{at:o,match:r,mode:u,voids:c}))){var b={},E={};if(0!==y.length){var w=!1;for(var C in t)"children"!==C&&"text"!==C&&i(t[C],m[C])&&(w=!0,m.hasOwnProperty(C)&&(b[C]=m[C]),a?null!=t[C]&&(E[C]=a(m[C],t[C])):null!=t[C]&&(E[C]=t[C]));w&&e.apply({type:"set_node",path:y,properties:b,newProperties:E})}}}})}(e,...n)},setNormalizing:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{yp.set(e,t)})(e,...n)},setPoint:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{selection:r}=e,{edge:o="both"}=n;if(r){"start"===o&&(o=Bp.isBackward(r)?"focus":"anchor"),"end"===o&&(o=Bp.isBackward(r)?"anchor":"focus");var{anchor:i,focus:a}=r,s="anchor"===o?i:a;Wh.setSelection(e,{["anchor"===o?"anchor":"focus"]:hg(hg({},s),t)})}}(e,...n)},setSelection:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var{selection:n}=e,r={},o={};if(n){for(var i in t)("anchor"===i&&null!=t.anchor&&!wh.equals(t.anchor,n.anchor)||"focus"===i&&null!=t.focus&&!wh.equals(t.focus,n.focus)||"anchor"!==i&&"focus"!==i&&t[i]!==n[i])&&(r[i]=n[i],o[i]=t[i]);Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:o})}})(e,...n)},splitNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return bg(e,...n)},start:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>mh.point(e,t,{edge:"start"}))(e,...n)},string:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{voids:r=!1}=n,o=mh.range(e,t),[i,a]=Bp.edges(o),s="";for(var[u,l]of mh.nodes(e,{at:o,match:_p.isText,voids:r})){var c=u.text;Cp.equals(l,a.path)&&(c=c.slice(0,a.offset)),Cp.equals(l,i.path)&&(c=c.slice(i.offset)),s+=c}return s}(e,...n)},unhangRange:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{voids:r=!1}=n,[o,i]=Bp.edges(t);if(0!==o.offset||0!==i.offset||Bp.isCollapsed(t)||Cp.hasPrevious(i.path))return t;var a=mh.above(e,{at:i,match:t=>_p.isElement(t)&&mh.isBlock(e,t),voids:r}),s=a?a[1]:[],u={anchor:mh.start(e,o),focus:i},l=!0;for(var[c,d]of mh.nodes(e,{at:u,match:_p.isText,reverse:!0,voids:r}))if(l)l=!1;else if(""!==c.text||Cp.isBefore(d,s)){i={path:d,offset:c.text.length};break}return{anchor:o,focus:i}}(e,...n)},unsetNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Array.isArray(t)||(t=[t]);var r={};for(var o of t)r[o]=null;Wh.setNodes(e,r,n)}(e,...n)},unwrapNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};mh.withoutNormalizing(e,()=>{var{mode:n="lowest",split:r=!1,voids:o=!1}=t,{at:i=e.selection,match:a}=t;if(i){null==a&&(a=yh.isPath(i)?Vp(e,i):t=>_p.isElement(t)&&mh.isBlock(e,t)),yh.isPath(i)&&(i=mh.range(e,i));var s=yh.isRange(i)?mh.rangeRef(e,i):null,u=mh.nodes(e,{at:i,match:a,mode:n,voids:o}),l=Array.from(u,t=>{var[,n]=t;return mh.pathRef(e,n)}).reverse(),c=function(){var t=d.unref(),[n]=mh.node(e,t),i=mh.range(e,t);r&&s&&(i=Bp.intersection(s.current,i)),Wh.liftNodes(e,{at:i,match:e=>!_p.isText(n)&&n.children.includes(e),voids:o})};for(var d of l)c();s&&s.unref()}})}(e,...n)},void:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return mh.above(e,og(og({},t),{},{match:t=>_p.isElement(t)&&mh.isVoid(e,t)}))}(e,...n)},withoutNormalizing:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var n=mh.isNormalizing(e);mh.setNormalizing(e,!1);try{t()}finally{mh.setNormalizing(e,n)}mh.normalize(e)})(e,...n)},wrapNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};mh.withoutNormalizing(e,()=>{var{mode:r="lowest",split:o=!1,voids:i=!1}=n,{match:a,at:s=e.selection}=n;if(s){if(null==a&&(a=yh.isPath(s)?Vp(e,s):e.isInline(t)?t=>_p.isElement(t)&&mh.isInline(e,t)||_p.isText(t):t=>_p.isElement(t)&&mh.isBlock(e,t)),o&&yh.isRange(s)){var[u,l]=Bp.edges(s),c=mh.rangeRef(e,s,{affinity:"inward"}),d=t=>{var n=mh.above(e,{at:t,match:t=>_p.isElement(t)&&mh.isBlock(e,t)});return n&&mh.isEdge(e,t,n[1])};Wh.splitNodes(e,{at:l,match:a,voids:i,always:!d(l)}),Wh.splitNodes(e,{at:u,match:a,voids:i,always:!d(u)}),s=c.unref(),null==n.at&&Wh.select(e,s)}var f=Array.from(mh.nodes(e,{at:s,match:e.isInline(t)?t=>_p.isElement(t)&&mh.isBlock(e,t):e=>_p.isEditor(e),mode:"lowest",voids:i})),p=function(){var n=yh.isRange(s)?Bp.intersection(s,mh.range(e,h)):s;if(!n)return 0;var o=Array.from(mh.nodes(e,{at:n,match:a,mode:r,voids:i}));if(o.length>0){var[u]=o,l=o[o.length-1],[,c]=u,[,d]=l;if(0===c.length&&0===d.length)return 0;var f=Cp.equals(c,d)?Cp.parent(c):Cp.common(c,d),p=mh.range(e,c,d),g=mh.node(e,f),[v]=g,m=f.length+1,y=Cp.next(d.slice(0,m)),b=wg(wg({},t),{},{children:[]});Wh.insertNodes(e,b,{at:y,voids:i}),Wh.moveNodes(e,{at:p,match:e=>!_p.isText(v)&&v.children.includes(e),to:y.concat(0),voids:i})}};for(var[,h]of f)p()}})}(e,...n)},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var[n,r]=t;return _p.isElement(n)&&mh.isEmpty(e,n)||_p.isText(n)&&""===n.text&&0!==r[r.length-1]})(e,...n)}};return e},Dg={isHistory:e=>zp(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(0===e.redos.length||Hp.isOperationList(e.redos[0].operations))&&(0===e.undos.length||Hp.isOperationList(e.undos[0].operations))},Ag=new WeakMap,Sg=new WeakMap,Og=new WeakMap,xg={isHistoryEditor:e=>Dg.isHistory(e.history)&&mh.isEditor(e),isMerging:e=>Sg.get(e),isSplittingOnce:e=>Og.get(e),setSplittingOnce(e,t){Og.set(e,t)},isSaving:e=>Ag.get(e),redo(e){e.redo()},undo(e){e.undo()},withMerging(e,t){var n=xg.isMerging(e);Sg.set(e,!0),t(),Sg.set(e,n)},withNewBatch(e,t){var n=xg.isMerging(e);Sg.set(e,!0),Og.set(e,!0),t(),Sg.set(e,n),Og.delete(e)},withoutMerging(e,t){var n=xg.isMerging(e);Sg.set(e,!1),t(),Sg.set(e,n)},withoutSaving(e,t){var n=xg.isSaving(e);Ag.set(e,!1);try{t()}finally{Ag.set(e,n)}}},Ng=e=>{var t=e,{apply:n}=t;return t.history={undos:[],redos:[]},t.redo=()=>{var{history:e}=t,{redos:n}=e;if(n.length>0){var r=n[n.length-1];r.selectionBefore&&Wh.setSelection(t,r.selectionBefore),xg.withoutSaving(t,()=>{mh.withoutNormalizing(t,()=>{for(var e of r.operations)t.apply(e)})}),e.redos.pop(),t.writeHistory("undos",r)}},t.undo=()=>{var{history:e}=t,{undos:n}=e;if(n.length>0){var r=n[n.length-1];xg.withoutSaving(t,()=>{mh.withoutNormalizing(t,()=>{var e=r.operations.map(Hp.inverse).reverse();for(var n of e)t.apply(n);r.selectionBefore&&Wh.setSelection(t,r.selectionBefore)})}),t.writeHistory("redos",r),e.undos.pop()}},t.apply=e=>{var{operations:r,history:o}=t,{undos:i}=o,a=i[i.length-1],s=a&&a.operations[a.operations.length-1],u=xg.isSaving(t),l=xg.isMerging(t);if(null==u&&(u=Tg(e)),u){if(null==l&&(l=null!=a&&(!!r.includes(s)||Bg(e,s))),xg.isSplittingOnce(t)&&(l=!1,xg.setSplittingOnce(t,void 0)),a&&l)a.operations.push(e);else{var c={operations:[e],selectionBefore:t.selection};t.writeHistory("undos",c)}for(;i.length>100;)i.shift();o.redos=[]}n(e)},t.writeHistory=(e,n)=>{t.history[e].push(n)},t},Bg=(e,t)=>!(!t||"insert_text"!==e.type||"insert_text"!==t.type||e.offset!==t.offset+t.text.length||!Cp.equals(e.path,t.path))||!(!t||"remove_text"!==e.type||"remove_text"!==t.type||e.offset+e.text.length!==t.offset||!Cp.equals(e.path,t.path)),Tg=(e,t)=>"set_selection"!==e.type,kg=function(e,t){return kg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},kg(e,t)};function Fg(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}kg(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ig=function(){return Ig=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ig.apply(this,arguments)};function Pg(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})}function Rg(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function _g(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Lg(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Mg(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function jg(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=_g(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){(function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)})(r,o,(t=e[n](t)).done,t.value)})}}}"function"==typeof SuppressedError&&SuppressedError;var Hg,zg={exports:{}};var $g,Ug,Vg=(Hg||(Hg=1,function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Boolean]",a="[object Date]",s="[object Function]",u="[object GeneratorFunction]",l="[object Map]",c="[object Number]",d="[object Object]",f="[object Promise]",p="[object RegExp]",h="[object Set]",g="[object String]",v="[object Symbol]",m="[object WeakMap]",b="[object ArrayBuffer]",E="[object DataView]",w="[object Float32Array]",C="[object Float64Array]",D="[object Int8Array]",A="[object Int16Array]",S="[object Int32Array]",O="[object Uint8Array]",x="[object Uint8ClampedArray]",N="[object Uint16Array]",B="[object Uint32Array]",T=/\w*$/,k=/^\[object .+?Constructor\]$/,F=/^(?:0|[1-9]\d*)$/,I={};I[o]=I["[object Array]"]=I[b]=I[E]=I[i]=I[a]=I[w]=I[C]=I[D]=I[A]=I[S]=I[l]=I[c]=I[d]=I[p]=I[h]=I[g]=I[v]=I[O]=I[x]=I[N]=I[B]=!0,I["[object Error]"]=I[s]=I[m]=!1;var P="object"==typeof y&&y&&y.Object===Object&&y,R="object"==typeof self&&self&&self.Object===Object&&self,_=P||R||Function("return this")(),L=t&&!t.nodeType&&t,M=L&&e&&!e.nodeType&&e,j=M&&M.exports===L;function H(e,t){return e.set(t[0],t[1]),e}function z(e,t){return e.add(t),e}function $(e,t,n,r){for(var o=-1,i=e?e.length:0;++o<i;)n=t(n,e[o],o,e);return n}function U(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function V(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function W(e,t){return function(n){return e(t(n))}}function G(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var q=Array.prototype,K=Function.prototype,Y=Object.prototype,X=_["__core-js_shared__"],Z=function(){var e=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),J=K.toString,Q=Y.hasOwnProperty,ee=Y.toString,te=RegExp("^"+J.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=j?_.Buffer:void 0,re=_.Symbol,oe=_.Uint8Array,ie=W(Object.getPrototypeOf,Object),ae=Object.create,se=Y.propertyIsEnumerable,ue=q.splice,le=Object.getOwnPropertySymbols,ce=ne?ne.isBuffer:void 0,de=W(Object.keys,Object),fe=Le(_,"DataView"),pe=Le(_,"Map"),he=Le(_,"Promise"),ge=Le(_,"Set"),ve=Le(_,"WeakMap"),me=Le(Object,"create"),ye=$e(fe),be=$e(pe),Ee=$e(he),we=$e(ge),Ce=$e(ve),De=re?re.prototype:void 0,Ae=De?De.valueOf:void 0;function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(e){this.__data__=new Oe(e)}function Be(e,t){var n=Ve(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&We(e)}(e)&&Q.call(e,"callee")&&(!se.call(e,"callee")||ee.call(e)==o)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!Q.call(e,a)||i&&("length"==a||He(a,r))||n.push(a);return n}function Te(e,t,n){var r=e[t];Q.call(e,t)&&Ue(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function ke(e,t){for(var n=e.length;n--;)if(Ue(e[n][0],t))return n;return-1}function Fe(e,t,n,r,f,m,y){var k;if(r&&(k=m?r(e,f,m,y):r(e)),void 0!==k)return k;if(!Ke(e))return e;var F=Ve(e);if(F){if(k=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&Q.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!t)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,k)}else{var P=je(e),R=P==s||P==u;if(Ge(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(P==d||P==o||R&&!m){if(U(e))return m?e:{};if(k=function(e){return"function"!=typeof e.constructor||ze(e)?{}:Ke(t=ie(e))?ae(t):{};var t}(R?{}:e),!t)return function(e,t){return Re(e,Me(e),t)}(e,function(e,t){return e&&Re(t,Ye(t),e)}(k,e))}else{if(!I[P])return m?e:{};k=function(e,t,n,r){var o=e.constructor;switch(t){case b:return Pe(e);case i:case a:return new o(+e);case E:return function(e,t){var n=t?Pe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case w:case C:case D:case A:case S:case O:case x:case N:case B:return function(e,t){var n=t?Pe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case l:return function(e,t,n){var r=t?n(V(e),!0):V(e);return $(r,H,new e.constructor)}(e,r,n);case c:case g:return new o(e);case p:return function(e){var t=new e.constructor(e.source,T.exec(e));return t.lastIndex=e.lastIndex,t}(e);case h:return function(e,t,n){var r=t?n(G(e),!0):G(e);return $(r,z,new e.constructor)}(e,r,n);case v:return function(e){return Ae?Object(Ae.call(e)):{}}(e)}}(e,P,Fe,t)}}y||(y=new Ne);var _=y.get(e);if(_)return _;if(y.set(e,k),!F)var L=n?function(e){return function(e,t,n){var r=t(e);return Ve(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ye,Me)}(e):Ye(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(L||e,function(o,i){L&&(o=e[i=o]),Te(k,i,Fe(o,t,n,r,i,e,y))}),k}function Ie(e){return!(!Ke(e)||(t=e,Z&&Z in t))&&(qe(e)||U(e)?te:k).test($e(e));var t}function Pe(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Re(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o];Te(n,a,e[a])}return n}function _e(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Le(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Ie(n)?n:void 0}Se.prototype.clear=function(){this.__data__=me?me(null):{}},Se.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Se.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===n?void 0:r}return Q.call(t,e)?t[e]:void 0},Se.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},Se.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?n:t,this},Oe.prototype.clear=function(){this.__data__=[]},Oe.prototype.delete=function(e){var t=this.__data__,n=ke(t,e);return!(n<0||(n==t.length-1?t.pop():ue.call(t,n,1),0))},Oe.prototype.get=function(e){var t=this.__data__,n=ke(t,e);return n<0?void 0:t[n][1]},Oe.prototype.has=function(e){return ke(this.__data__,e)>-1},Oe.prototype.set=function(e,t){var n=this.__data__,r=ke(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},xe.prototype.clear=function(){this.__data__={hash:new Se,map:new(pe||Oe),string:new Se}},xe.prototype.delete=function(e){return _e(this,e).delete(e)},xe.prototype.get=function(e){return _e(this,e).get(e)},xe.prototype.has=function(e){return _e(this,e).has(e)},xe.prototype.set=function(e,t){return _e(this,e).set(e,t),this},Ne.prototype.clear=function(){this.__data__=new Oe},Ne.prototype.delete=function(e){return this.__data__.delete(e)},Ne.prototype.get=function(e){return this.__data__.get(e)},Ne.prototype.has=function(e){return this.__data__.has(e)},Ne.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Oe){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this;n=this.__data__=new xe(r)}return n.set(e,t),this};var Me=le?W(le,Object):function(){return[]},je=function(e){return ee.call(e)};function He(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||F.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Y)}function $e(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ue(e,t){return e===t||e!=e&&t!=t}(fe&&je(new fe(new ArrayBuffer(1)))!=E||pe&&je(new pe)!=l||he&&je(he.resolve())!=f||ge&&je(new ge)!=h||ve&&je(new ve)!=m)&&(je=function(e){var t=ee.call(e),n=t==d?e.constructor:void 0,r=n?$e(n):void 0;if(r)switch(r){case ye:return E;case be:return l;case Ee:return f;case we:return h;case Ce:return m}return t});var Ve=Array.isArray;function We(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!qe(e)}var Ge=ce||function(){return!1};function qe(e){var t=Ke(e)?ee.call(e):"";return t==s||t==u}function Ke(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ye(e){return We(e)?Be(e):function(e){if(!ze(e))return de(e);var t=[];for(var n in Object(e))Q.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Fe(e,!0,!0)}}(zg,zg.exports)),zg.exports),Wg=b(Vg);var Gg=function(){if(Ug)return $g;Ug=1;var e=9007199254740991,t="[object Arguments]",n="[object Function]",r="[object GeneratorFunction]",o=/^(?:0|[1-9]\d*)$/;function i(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););return e}var a,s,u=Object.prototype,l=u.hasOwnProperty,c=u.toString,d=u.propertyIsEnumerable,f=(a=Object.keys,s=Object,function(e){return a(s(e))});function p(e,n){var r=b(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&E(e)}(e)&&l.call(e,"callee")&&(!d.call(e,"callee")||c.call(e)==t)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=r.length,i=!!o;for(var a in e)!l.call(e,a)||i&&("length"==a||y(a,o))||r.push(a);return r}var h,g=(h=function(e,t){return e&&v(e,t,w)},function(e,t){if(null==e)return e;if(!E(e))return h(e,t);for(var n=e.length,r=-1,o=Object(e);++r<n&&!1!==t(o[r],r,o););return e}),v=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}return e};function m(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||u,t!==r)return f(e);var t,n,r,o=[];for(var i in Object(e))l.call(e,i)&&"constructor"!=i&&o.push(i);return o}function y(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||o.test(t))&&t>-1&&t%1==0&&t<n}var b=Array.isArray;function E(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?c.call(e):"";return t==n||t==r}(t)}function w(e){return E(e)?p(e):m(e)}function C(e){return e}return $g=function(e,t){return(b(e)?i:g)(e,"function"==typeof t?t:C)}}(),qg=b(Gg),Kg=new Set(["base","embed","math","meta","object","script","svg","template"]),Yg=new Set(["href","poster","src","xlink:href"]),Xg=["java","script:"].join("");function Zg(e,t,n){var r=function(e){return Array.from(e).filter(function(e){return e>" "}).join("").toLowerCase()}(n);return!r||!r.startsWith(Xg)&&!r.startsWith("vbscript:")&&(!r.startsWith("data:")||"href"!==t&&"xlink:href"!==t&&(("img"===e||"poster"===t)&&r.startsWith("data:image/")))}function Jg(e){if(void 0===e&&(e=""),!e)return"";var t=(new DOMParser).parseFromString(e,"text/html");return Array.from(t.body.querySelectorAll("*")).forEach(function(e){var t=e.tagName.toLowerCase();Kg.has(t)?e.remove():Array.from(e.attributes).forEach(function(n){var r=n.name.toLowerCase(),o=n.value||"";("srcdoc"===r||r.startsWith("on")||Yg.has(r)&&!Zg(t,r,o))&&e.removeAttribute(n.name)})}),t.body.innerHTML}var Qg={};var ev="created",tv="destroyed",nv="change",rv="scroll",ov="fullscreen",iv="unFullScreen",av="modalOrPanelShow",sv="modalOrPanelHide",uv={};function lv(e,t){var n=e.key,r=e.factory,o=e.config,i=Ig(Ig({},o),t||{});if(null!=uv[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));uv[n]=r,function(e,t){null!=t&&(Qg[e]=t)}(n,i)}var cv=new WeakMap,dv=new WeakMap,fv=new WeakMap,pv=new WeakMap,hv=new WeakMap,gv=new WeakMap,vv=new WeakMap,mv=new WeakMap,yv=new WeakMap,bv=new WeakMap,Ev=new WeakMap,wv=new WeakMap,Cv=new WeakMap,Dv=new WeakMap,Av=new WeakMap,Sv=new WeakMap,Ov=new WeakMap,xv=new WeakMap,Nv=new WeakMap,Bv=new WeakMap,Tv=new WeakMap,kv=new WeakMap,Fv=new WeakMap,Iv=new WeakMap,Pv=new WeakMap,Rv=new WeakMap,_v=new WeakMap,Lv=new WeakMap,Mv=new WeakMap,jv=function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in uv)e.push(t);return e},t.getConfig=function(){var e=bv.get(t);if(null==e)throw new Error("Can not get editor config");return e},t.getMenuConfig=function(e){var n=t.getConfig().MENU_CONF;return(void 0===n?{}:n)[e]||{}},t.alert=function(e,n){void 0===n&&(n="info");var r=t.getConfig().customAlert;r&&r(e,n)},t},Hv=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function zv(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function $v(e={},t={}){Object.keys(t).forEach(n=>{void 0===e[n]?e[n]=t[n]:zv(t[n])&&zv(e[n])&&Object.keys(t[n]).length>0&&$v(e[n],t[n])})}const Uv={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Vv(){const e="undefined"!=typeof document?document:{};return $v(e,Uv),e}const Wv={document:Uv,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function Gv(){const e="undefined"!=typeof window?window:{};return $v(e,Wv),e}class qv extends Array{constructor(e){"number"==typeof e?super(e):(super(...e||[]),function(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get:()=>t,set(e){t.__proto__=e}})}(this))}}function Kv(e=[]){const t=[];return e.forEach(e=>{Array.isArray(e)?t.push(...Kv(e)):t.push(e)}),t}function Yv(e,t){return Array.prototype.filter.call(e,t)}function Xv(e){return e.toLowerCase().replace(/-(.)/g,(e,t)=>t.toUpperCase())}function Zv(e,t){const n=Gv(),r=Vv();let o=[];if(!t&&e instanceof qv)return e;if(!e)return new qv(o);if("string"==typeof e){const n=e.trim();if(n.indexOf("<")>=0&&n.indexOf(">")>=0){let e="div";0===n.indexOf("<li")&&(e="ul"),0===n.indexOf("<tr")&&(e="tbody"),0!==n.indexOf("<td")&&0!==n.indexOf("<th")||(e="tr"),0===n.indexOf("<tbody")&&(e="table"),0===n.indexOf("<option")&&(e="select");const t=r.createElement(e);t.innerHTML=n;for(let e=0;e<t.childNodes.length;e+=1)o.push(t.childNodes[e])}else o=function(e,t){if("string"!=typeof e)return[e];const n=[],r=t.querySelectorAll(e);for(let e=0;e<r.length;e+=1)n.push(r[e]);return n}(e.trim(),t||r)}else if(e.nodeType||e===n||e===r)o.push(e);else if(Array.isArray(e)){if(e instanceof qv)return e;o=e}return new qv(function(e){const t=[];for(let n=0;n<e.length;n+=1)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(o))}function Jv(...e){const t=Kv(e.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.add(...t)}),this}function Qv(...e){const t=Kv(e.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.remove(...t)}),this}function em(...e){const t=Kv(e.map(e=>e.split(" ")));return Yv(this,e=>t.filter(t=>e.classList.contains(t)).length>0).length>0}function tm(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(e,t);else for(const t in e)this[n][t]=e[t],this[n].setAttribute(t,e[t]);return this}function nm(e){for(let t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function rm(e,t){let n;if(void 0===t){if(n=this[0],!n)return;if(n.dom7ElementDataStorage&&e in n.dom7ElementDataStorage)return n.dom7ElementDataStorage[e];const t=n.getAttribute(`data-${e}`);return t||void 0}for(let r=0;r<this.length;r+=1)n=this[r],n.dom7ElementDataStorage||(n.dom7ElementDataStorage={}),n.dom7ElementDataStorage[e]=t;return this}function om(){const e=this[0];if(!e)return;const t={};if(e.dataset)for(const n in e.dataset)t[n]=e.dataset[n];else for(let n=0;n<e.attributes.length;n+=1){const r=e.attributes[n];r.name.indexOf("data-")>=0&&(t[Xv(r.name.split("data-")[1])]=r.value)}for(const e in t)"false"===t[e]?t[e]=!1:"true"===t[e]?t[e]=!0:parseFloat(t[e])===1*t[e]&&(t[e]*=1);return t}function im(e){if(void 0===e){const e=this[0];if(!e)return;if(e.multiple&&"select"===e.nodeName.toLowerCase()){const t=[];for(let n=0;n<e.selectedOptions.length;n+=1)t.push(e.selectedOptions[n].value);return t}return e.value}for(let t=0;t<this.length;t+=1){const n=this[t];if(Array.isArray(e)&&n.multiple&&"select"===n.nodeName.toLowerCase())for(let t=0;t<n.options.length;t+=1)n.options[t].selected=e.indexOf(n.options[t].value)>=0;else n.value=e}return this}function am(...e){let[t,n,r,o]=e;function i(e){const t=e.target;if(!t)return;const o=e.target.dom7EventData||[];if(o.indexOf(e)<0&&o.unshift(e),Zv(t).is(n))r.apply(t,o);else{const e=Zv(t).parents();for(let t=0;t<e.length;t+=1)Zv(e[t]).is(n)&&r.apply(e[t],o)}}function a(e){const t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),r.apply(this,t)}"function"==typeof e[1]&&([t,r,o]=e,n=void 0),o||(o=!1);const s=t.split(" ");let u;for(let e=0;e<this.length;e+=1){const t=this[e];if(n)for(u=0;u<s.length;u+=1){const e=s[u];t.dom7LiveListeners||(t.dom7LiveListeners={}),t.dom7LiveListeners[e]||(t.dom7LiveListeners[e]=[]),t.dom7LiveListeners[e].push({listener:r,proxyListener:i}),t.addEventListener(e,i,o)}else for(u=0;u<s.length;u+=1){const e=s[u];t.dom7Listeners||(t.dom7Listeners={}),t.dom7Listeners[e]||(t.dom7Listeners[e]=[]),t.dom7Listeners[e].push({listener:r,proxyListener:a}),t.addEventListener(e,a,o)}}return this}function sm(...e){let[t,n,r,o]=e;"function"==typeof e[1]&&([t,r,o]=e,n=void 0),o||(o=!1);const i=t.split(" ");for(let e=0;e<i.length;e+=1){const t=i[e];for(let e=0;e<this.length;e+=1){const i=this[e];let a;if(!n&&i.dom7Listeners?a=i.dom7Listeners[t]:n&&i.dom7LiveListeners&&(a=i.dom7LiveListeners[t]),a&&a.length)for(let e=a.length-1;e>=0;e-=1){const n=a[e];r&&n.listener===r||r&&n.listener&&n.listener.dom7proxy&&n.listener.dom7proxy===r?(i.removeEventListener(t,n.proxyListener,o),a.splice(e,1)):r||(i.removeEventListener(t,n.proxyListener,o),a.splice(e,1))}}}return this}function um(){const e=Gv();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function lm(){const e=Gv();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function cm(){if(this.length>0){const e=Gv(),t=Vv(),n=this[0],r=n.getBoundingClientRect(),o=t.body,i=n.clientTop||o.clientTop||0,a=n.clientLeft||o.clientLeft||0,s=n===e?e.scrollY:n.scrollTop,u=n===e?e.scrollX:n.scrollLeft;return{top:r.top+s-i,left:r.left+u-a}}return null}function dm(){for(let e=0;e<this.length;e+=1)this[e].style.display="none";return this}function fm(){const e=Gv();for(let t=0;t<this.length;t+=1){const n=this[t];"none"===n.style.display&&(n.style.display=""),"none"===e.getComputedStyle(n,null).getPropertyValue("display")&&(n.style.display="block")}return this}function pm(e,t){const n=Gv();let r;if(1===arguments.length){if("string"!=typeof e){for(r=0;r<this.length;r+=1)for(const t in e)this[r].style[t]=e[t];return this}if(this[0])return n.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(r=0;r<this.length;r+=1)this[r].style[e]=t;return this}return this}function hm(e){return e?(this.forEach((t,n)=>{e.apply(t,[t,n])}),this):this}function gm(e){return Zv(Yv(this,e))}function vm(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(let t=0;t<this.length;t+=1)this[t].innerHTML=e;return this}function mm(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(let t=0;t<this.length;t+=1)this[t].textContent=e;return this}function ym(e){const t=Gv(),n=Vv(),r=this[0];let o,i;if(!r||void 0===e)return!1;if("string"==typeof e){if(r.matches)return r.matches(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);for(o=Zv(e),i=0;i<o.length;i+=1)if(o[i]===r)return!0;return!1}if(e===n)return r===n;if(e===t)return r===t;if(e.nodeType||e instanceof qv){for(o=e.nodeType?[e]:e,i=0;i<o.length;i+=1)if(o[i]===r)return!0;return!1}return!1}function bm(...e){let t;const n=Vv();for(let r=0;r<e.length;r+=1){t=e[r];for(let e=0;e<this.length;e+=1)if("string"==typeof t){const r=n.createElement("div");for(r.innerHTML=t;r.firstChild;)this[e].appendChild(r.firstChild)}else if(t instanceof qv)for(let n=0;n<t.length;n+=1)this[e].appendChild(t[n]);else this[e].appendChild(t)}return this}function Em(e){const t=Vv();let n,r;for(n=0;n<this.length;n+=1)if("string"==typeof e){const o=t.createElement("div");for(o.innerHTML=e,r=o.childNodes.length-1;r>=0;r-=1)this[n].insertBefore(o.childNodes[r],this[n].childNodes[0])}else if(e instanceof qv)for(r=0;r<e.length;r+=1)this[n].insertBefore(e[r],this[n].childNodes[0]);else this[n].insertBefore(e,this[n].childNodes[0]);return this}function wm(e){const t=[];for(let n=0;n<this.length;n+=1)null!==this[n].parentNode&&(e?Zv(this[n].parentNode).is(e)&&t.push(this[n].parentNode):t.push(this[n].parentNode));return Zv(t)}function Cm(e){const t=[];for(let n=0;n<this.length;n+=1){let r=this[n].parentNode;for(;r;)e?Zv(r).is(e)&&t.push(r):t.push(r),r=r.parentNode}return Zv(t)}function Dm(e){const t=[];for(let n=0;n<this.length;n+=1){const r=this[n].querySelectorAll(e);for(let e=0;e<r.length;e+=1)t.push(r[e])}return Zv(t)}function Am(e){const t=[];for(let n=0;n<this.length;n+=1){const r=this[n].children;for(let n=0;n<r.length;n+=1)e&&!Zv(r[n]).is(e)||t.push(r[n])}return Zv(t)}function Sm(){for(let e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}function Om(){for(let e=0;e<this.length;e+=1){const t=this[e];if(1===t.nodeType){for(let e=0;e<t.childNodes.length;e+=1)t.childNodes[e].parentNode&&t.childNodes[e].parentNode.removeChild(t.childNodes[e]);t.textContent=""}}return this}Zv.fn=qv.prototype;const xm="resize scroll".split(" ");function Nm(e){return function(...t){if(void 0===t[0]){for(let t=0;t<this.length;t+=1)xm.indexOf(e)<0&&(e in this[t]?this[t][e]():Zv(this[t]).trigger(e));return this}return this.on(e,...t)}}const Bm=Nm("click"),Tm=Nm("focus"),km=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let Fm=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};function Im(e){Promise.resolve().then(e)}function Pm(e){return e.replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™").replace(/"/g,'"')}var Rm,_m=function(e){return Object.prototype.toString.call(e)},Lm=globalThis.Node;pm&&(Zv.fn.css=pm),bm&&(Zv.fn.append=bm),Jv&&(Zv.fn.addClass=Jv),Qv&&(Zv.fn.removeClass=Qv),em&&(Zv.fn.hasClass=em),am&&(Zv.fn.on=am),Tm&&(Zv.fn.focus=Tm),tm&&(Zv.fn.attr=tm),nm&&(Zv.fn.removeAttr=nm),dm&&(Zv.fn.hide=dm),fm&&(Zv.fn.show=fm),cm&&(Zv.fn.offset=cm),um&&(Zv.fn.width=um),lm&&(Zv.fn.height=lm),wm&&(Zv.fn.parent=wm),Cm&&(Zv.fn.parents=Cm),ym&&(Zv.fn.is=ym),om&&(Zv.fn.dataset=om),im&&(Zv.fn.val=im),mm&&(Zv.fn.text=mm),vm&&(Zv.fn.html=vm),Am&&(Zv.fn.children=Am),Sm&&(Zv.fn.remove=Sm),Dm&&(Zv.fn.find=Dm),hm&&(Zv.fn.each=hm),Om&&(Zv.fn.empty=Om),function(e){e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(Rm||(Rm={}));var Mm=/\[object HTML([A-Z][a-z]*)*Element\]/,jm=function(e){return Mm.test(_m(e))},Hm=function(e){return null!=e&&"number"==typeof e.nodeType},zm=function(e){return Hm(e)&&e.nodeType===Rm.COMMENT_NODE},$m=function(e){return Hm(e)&&e.nodeType===Rm.ELEMENT_NODE},Um=function(e){return"[object Selection]"===_m(e)},Vm=function(e){return Hm(e)&&e.nodeType===Rm.TEXT_NODE},Wm=function(e){var t,n,r;return null!==(t=window&&window.document.getElementById(e))&&void 0!==t?t:window&&(null===(r=null===(n=window.document.activeElement)||void 0===n?void 0:n.shadowRoot)||void 0===r?void 0:r.getElementById(e))||null},Gm=function(e,t,n){for(var r=e.childNodes,o=r[t],i=t,a=!1,s=!1;(zm(o)||$m(o)&&0===o.childNodes.length||$m(o)&&"false"===o.getAttribute("contenteditable"))&&(!a||!s);)i>=r.length?(a=!0,i=t-1,n="backward"):i<0?(s=!0,i=t+1,n="forward"):(o=r[i],t=i,i+="forward"===n?1:-1);return[o,t]},qm=function(e,t,n){return Lg(Gm(e,t,n),1)[0]},Km=function(e){var t,n,r="";if(Vm(e)&&e.nodeValue)return e.nodeValue;if($m(e)){try{for(var o=_g(Array.from(e.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=Km(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}var s=getComputedStyle(e).getPropertyValue("display");"block"!==s&&"list"!==s&&"table-row"!==s&&"BR"!==e.tagName||(r+="\n")}return r};function Ym(e,t){if(!jm(e)||"true"!==e.dataset.slateVoid)for(var n=e.childNodes,r=n.length;r-=1;){var o=n[r],i=o.nodeType;Vm(o)?t(o,e):[Rm.ELEMENT_NODE,Rm.DOCUMENT_NODE,Rm.DOCUMENT_FRAGMENT_NODE].includes(i)&&Ym(o,t)}}function Xm(e){if(0===e.length)return"";var t=e[0];return t.nodeType!==Rm.ELEMENT_NODE?"":t.tagName.toLowerCase()}var Zm=new RegExp(String.fromCharCode(160),"g");function Jm(e){return e.replace(Zm," ")}var Qm=["span","b","strong","i","em","s","strike","u","font","sub","sup"],ey=[];var ty=[];var ny={};function ry(e,t){var n=e.length;if(n){var r=e[n-1];if(Nh.isText(r)){var o=Object.keys(r);if(1===o.length&&"text"===o[0])return r.text+=t,!0}}return!1}function oy(e,t,n){return{type:"paragraph",children:[{text:Zv(e).text().replace(/\s+/gm," ")}]}}function iy(e,t){var n=function(e,t){var n=[];if(null!=e.attr("data-w-e-is-void"))return n;var r=e[0].childNodes;return 1===r.length&&"BR"===r[0].nodeName?(n.push({text:""}),n):(r.forEach(function(e){if($m(e)){if("BR"===e.nodeName)return void(ry(n,"\n")||n.push({text:"\n"}));var r=cy(Zv(e),t);Array.isArray(r)?r.forEach(function(e){return n.push(e)}):n.push(r)}else if(Vm(e)){var o=e.textContent||"";if(""===o.trim()&&o.indexOf("\n")>=0)return;o&&(o=Jm(o),ry(n,o)||n.push({text:o}))}}),n)}(e,t),r=function(e){for(var t in ny)if(e[0].matches(t))return ny[t];return oy}(e),o=r(e[0],n,t);return Array.isArray(o)||(o=[o]),o.forEach(function(r){mh.isVoid(t,r)||(0===n.length&&(r.children=[{text:e.text().replace(/\s+/gm," ")}]),ty.forEach(function(n){r=n(e[0],r,t)}))}),o}function ay(e,t){0===e.parents("pre").length&&(e[0].innerHTML=e[0].innerHTML.replace(/[\r\n\t]+/g,"").replace(/<br>/g,"\n"));var n=e[0].textContent||"",r={text:n=Jm(n=Pm(n))};return ty.forEach(function(n){r=n(e[0],r,t)}),r}function sy(e,t){var n={text:""};return ty.forEach(function(r){n=r(e[0],n,t)}),n}function uy(e,t){var n=t.parentElement;return null==n?e:(null==n.closest("pre")&&(e=e.replace(/[\r\n\t]+/g,"")),e=Jm(e=Pm(e)))}function ly(e,t,n){var r=e[0];if($m(r)){var o=cy(e,n);return delete t.text,Array.isArray(o)?o.map(function(e){return Ig(Ig({},t),e)}):[Ig(Ig({},t),o)]}if(zm(r))return null;var i=Vm(r)?{text:uy(r.textContent||"",r)}:ay(e,n);return[Ig(Ig({},t),i)]}function cy(e,t){ey.forEach(function(t){var n=t.selector,r=t.preParseHtml;e[0].matches(n)&&(e=Zv(r(e[0])))});var n=Xm(e);if("span"===n){if(e.attr("data-w-e-type"))return iy(e,t);if((o=Array.from(e[0].childNodes)).some(function(e){return!Vm(e)&&!zm(e)})){var r=sy(Zv(e[0]),t);return o.flatMap(function(e){return ly(Zv(e),r,t)||[]})}return ay(e,t)}if("code"===n)return"pre"===Xm(e.parent())?iy(e,t):ay(e,t);if(Qm.includes(n)){var o;if((o=Array.from(e[0].childNodes)).some(function(e){return!Vm(e)&&!zm(e)})){var i=sy(Zv(e[0]),t);return o.flatMap(function(e){return ly(Zv(e),i,t)||[]})}return ay(e,t)}return iy(e,t)}function dy(e,t,n){var r=Zv(n);return!!r.attr(t)||(r.attr(t,"true"),e.on(tv,function(){r.removeAttr(t)}),!1)}function fy(e,t){void 0===t&&(t="");var n=[],r=e.getConfig().sanitizeHtml;""===t&&(t="<p><br></p>"),0!==t.indexOf("<")&&(t=t.split(/\n/).map(function(e){return"<p>".concat(e,"</p>")}).join("")),t=r?r(t):t;var o=Zv("<div>".concat(t,"</div>"));return Array.from(o.children()).forEach(function(t){var r=cy(Zv(t),e);Array.isArray(r)?r.forEach(function(e){return n.push(e)}):n.push(r)}),n}function py(e,t){return"w-e-element-".concat(e,"-").concat(t)}var hy=[];var gy,vy,my={};function yy(e,t,n){var r=n.isInline(e)?"span":"div";return"<".concat(r,">").concat(t,"</").concat(r,">")}function by(e,t){var n=e.type,r=void 0===n?"":n,o=e.children,i=void 0===o?[]:o,a=mh.isVoid(t,e),s="";a||(s=i.map(function(e){return Py(e,t)}).join(""));var u=function(e){return my[e]||yy}(r),l=u(e,s,t),c="";if(c="string"==typeof l?l:l.html||"",a||hy.forEach(function(t){return c=t(e,c)}),"string"==typeof l)return c;var d=l.prefix,f=void 0===d?"":d,p=l.suffix,h=void 0===p?"":p;return f&&(c=f+c),h&&(c+=h),c}var Ey=function(){if(vy)return gy;vy=1;var e=9007199254740991,t="[object Arguments]",n="[object Map]",r="[object Promise]",o="[object Set]",i="[object WeakMap]",a="[object DataView]",s=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,l="\\ud800-\\udfff",c="\\u0300-\\u036f\\ufe20-\\ufe23",d="\\u20d0-\\u20f0",f="\\ufe0e\\ufe0f",p="["+l+"]",h="["+c+d+"]",g="\\ud83c[\\udffb-\\udfff]",v="[^"+l+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",b="[\\ud800-\\udbff][\\udc00-\\udfff]",E="\\u200d",w="(?:"+h+"|"+g+")"+"?",C="["+f+"]?",D=C+w+("(?:"+E+"(?:"+[v,m,b].join("|")+")"+C+w+")*"),A="(?:"+[v+h+"?",h,m,b,p].join("|")+")",S=RegExp(g+"(?="+g+")|"+A+D,"g"),O=RegExp("["+E+l+c+d+f+"]"),x="object"==typeof y&&y&&y.Object===Object&&y,N="object"==typeof self&&self&&self.Object===Object&&self,B=x||N||Function("return this")();function T(e,t){return function(e,t){for(var n=-1,r=e?e.length:0,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}(t,function(t){return e[t]})}function k(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function F(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function I(e){return function(e){return O.test(e)}(e)?function(e){return e.match(S)||[]}(e):function(e){return e.split("")}(e)}var P,R,_=Function.prototype,L=Object.prototype,M=B["__core-js_shared__"],j=function(){var e=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),H=_.toString,z=L.hasOwnProperty,$=L.toString,U=RegExp("^"+H.call(z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),V=B.Symbol,W=V?V.iterator:void 0,G=L.propertyIsEnumerable,q=(P=Object.keys,R=Object,function(e){return P(R(e))}),K=se(B,"DataView"),Y=se(B,"Map"),X=se(B,"Promise"),Z=se(B,"Set"),J=se(B,"WeakMap"),Q=ce(K),ee=ce(Y),te=ce(X),ne=ce(Z),re=ce(J);function oe(e,n){var r=de(e)||function(e){return function(e){return ge(e)&&fe(e)}(e)&&z.call(e,"callee")&&(!G.call(e,"callee")||$.call(e)==t)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=r.length,i=!!o;for(var a in e)!z.call(e,a)||i&&("length"==a||le(a,o))||r.push(a);return r}function ie(e){if(!he(e)||function(e){return!!j&&j in e}(e))return!1;var t=pe(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?U:s;return t.test(ce(e))}function ae(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||L,t!==r)return q(e);var t,n,r,o=[];for(var i in Object(e))z.call(e,i)&&"constructor"!=i&&o.push(i);return o}function se(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ie(n)?n:void 0}var ue=function(e){return $.call(e)};function le(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||u.test(t))&&t>-1&&t%1==0&&t<n}function ce(e){if(null!=e){try{return H.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(K&&ue(new K(new ArrayBuffer(1)))!=a||Y&&ue(new Y)!=n||X&&ue(X.resolve())!=r||Z&&ue(new Z)!=o||J&&ue(new J)!=i)&&(ue=function(e){var t=$.call(e),s="[object Object]"==t?e.constructor:void 0,u=s?ce(s):void 0;if(u)switch(u){case Q:return a;case ee:return n;case te:return r;case ne:return o;case re:return i}return t});var de=Array.isArray;function fe(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!pe(t)}function pe(e){var t=he(e)?$.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function he(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ge(e){return!!e&&"object"==typeof e}function ve(e){return e?T(e,function(e){return fe(e)?oe(e):ae(e)}(e)):[]}return gy=function(e){if(!e)return[];if(fe(e))return function(e){return"string"==typeof e||!de(e)&&ge(e)&&"[object String]"==$.call(e)}(e)?I(e):function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e);if(W&&e[W])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[W]());var t=ue(e);return(t==n?k:t==o?F:ve)(e)},gy}(),wy=b(Ey),Cy=0,Dy=function(){this.id="".concat(Cy++)},Ay="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),Sy="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Oy="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),xy="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Ny="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),By="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),Ty=!Ny&&!xy&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,ky=function(e,t){return Boolean(e.compareDocumentPosition(t)&Lm.DOCUMENT_POSITION_PRECEDING)},Fy=function(e,t){return Boolean(e.compareDocumentPosition(t)&Lm.DOCUMENT_POSITION_FOLLOWING)},Iy={getWindow:function(e){var t=Fv.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey:function(e,t){var n=kv.get(t);return n||(n=new Dy,kv.set(t,n)),n},setNewKey:function(e){var t=new Dy;kv.set(e,t)},findPath:function(e,t){for(var n=[],r=t;;){var o=Ov.get(r);if(null==o){if(mh.isEditor(r))return n;break}var i=Sv.get(r);if(null==i)break;n.unshift(i),r=o}throw new Error("Unable to find the path for Slate node: ".concat(JSON.stringify(t)))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=Iy.toDOMNode(e,e),n=t.getRootNode();return"[object HTMLDocument]"!==_m(n)&&!function(e){return"[object ShadowRoot]"===_m(e)}(n)||null==Reflect.get(n,"getSelection")?t.ownerDocument:n},getParentNode:function(e,t){return Ov.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&null!=r;){var o=Iy.getParentNode(e,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(e,t){var n=[Iy.findPath(e,t)[0]];return _p.get(e,n)},toDOMNode:function(e,t){var n;if(mh.isEditor(t))n=xv.get(e);else{var r=Iy.findKey(e,t);n=Bv.get(r)}if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(t)));return n},hasDOMNode:function(e,t,n){void 0===n&&(n={});var r,o=n.editable,i=void 0!==o&&o,a=Iy.toDOMNode(e,e);try{r=$m(t)?t:t.parentElement}catch(e){if(e instanceof Error&&!e.message.includes('Permission denied to access property "nodeType"'))throw e}return!!r&&(r.closest("[data-slate-editor]")===a&&(!i||r.isContentEditable||r.closest('[contenteditable="false"]')===a||!!r.getAttribute("data-slate-zero-width"))||!!r.getAttribute("data-slate-string"))},toDOMRange:function(e,t){var n=t.anchor,r=t.focus,o=Bp.isBackward(t),i=Iy.toDOMPoint(e,n),a=Bp.isCollapsed(t)?i:Iy.toDOMPoint(e,r),s=Iy.getWindow(e).document.createRange(),u=Lg(o?a:i,2),l=u[0],c=u[1],d=Lg(o?i:a,2),f=d[0],p=d[1],h=!!($m(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),g=!!($m(f)?f:f.parentElement).getAttribute("data-slate-zero-width");return s.setStart(l,h?1:c),s.setEnd(f,g?1:p),s},toDOMPoint:function(e,t){var n,r,o,i=Lg(mh.node(e,t.path),1)[0],a=Iy.toDOMNode(e,i);mh.void(e,{at:t})&&(t={path:t.path,offset:0});var s=Array.from(a.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),u=0;try{for(var l=_g(s),c=l.next();!c.done;c=l.next()){var d=c.value,f=d.childNodes[0];if(null!=f&&null!=f.textContent){var p=f.textContent.length,h=d.getAttribute("data-slate-length"),g=u+(null==h?p:parseInt(h,10));if(t.offset<=g){o=[f,Math.min(p,Math.max(0,t.offset-u))];break}u=g}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(JSON.stringify(t)));return o},toSlateNode:function(e,t){var n=$m(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Nv.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},findEventRange:function(e,t){"nativeEvent"in t&&(t=t.nativeEvent);var n=t.clientX,r=t.clientY,o=t.target;if(null==n||null==r)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var i,a=Iy.toSlateNode(e,t.target),s=Iy.findPath(e,a);if(kp.isElement(a)&&mh.isVoid(e,a)){var u=o.getBoundingClientRect(),l=e.isInline(a)?n-u.left<u.left+u.width-n:r-u.top<u.top+u.height-r,c=mh.point(e,s,{edge:l?"start":"end"}),d=l?mh.before(e,c):mh.after(e,c);if(d)return mh.range(e,d)}var f=this.getWindow(e).document;if(f.caretRangeFromPoint)i=f.caretRangeFromPoint(n,r);else{var p=f.caretPositionFromPoint(n,r);p&&((i=f.createRange()).setStart(p.offsetNode,p.offset),i.setEnd(p.offsetNode,p.offset))}if(!i)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));return Iy.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,t,n){var r,o,i,a,s,u=n.exactMatch,l=n.suppressThrow;if((Um(t)?t.anchorNode:t.startContainer)&&(Um(t)?(r=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=By&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(r=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,s=t.collapsed)),null==r||null==i||null==o||null==a)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));var c=Iy.toSlatePoint(e,[r,o],{exactMatch:u,suppressThrow:l});if(!c)return null;var d=s?c:Iy.toSlatePoint(e,[i,a],{exactMatch:u,suppressThrow:l,searchDirection:ky(r,i)||r===i&&a<o?"forward":"backward"});if(!d)return null;var f={anchor:c,focus:d};return Bp.isExpanded(f)&&Bp.isForward(f)&&$m(i)&&mh.void(e,{at:f.focus,mode:"highest"})&&(f=mh.unhangRange(e,f,{voids:!0})),f},toSlatePoint:function(e,t,n){var r,o,i,a=n.exactMatch,s=n.suppressThrow,u=Lg(a?t:function(e){var t,n=Lg(e,2),r=n[0],o=n[1];if($m(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(t=Lg(Gm(r,a,i?"backward":"forward"),2))[0],i=(a=t[1])<o;$m(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=qm(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]}(t),2),l=u[0],c=u[1],d=l.parentNode,f=n.searchDirection,p=null,h=0;if(d){var g=Iy.toDOMNode(e,e),v=d.closest('[data-slate-void="true"]'),m=v&&g.contains(v)?v:null,y=d.closest('[contenteditable="false"]'),b=y&&g.contains(y)?y:null,E=d.closest("[data-slate-leaf]"),w=null,C=Iy.getWindow(e);if(E&&C.document.createRange){p=E.closest('[data-slate-node="text"]');var D=C.document.createRange();D.setStart(p,0),D.setEnd(l,c);var A=D.cloneContents();Mg(Mg([],Lg(wy(A.querySelectorAll("[data-slate-zero-width]"))),!1),Lg(wy(A.querySelectorAll("[contenteditable=false]"))),!1).forEach(function(e){e.parentNode.removeChild(e)}),h=A.textContent.length,w=p}else if(m)E=Array.from(m.querySelectorAll("[data-slate-leaf]")).find(function(t){return Iy.hasDOMNode(e,t)})||null,E?(p=E.closest('[data-slate-node="text"]'),h=(w=E).textContent.length,w.querySelectorAll("[data-slate-zero-width]").forEach(function(e){h-=e.textContent.length})):h=1;else if(b){var S=function(t){return t?Array.from(t.querySelectorAll("[data-slate-leaf]")).filter(function(t){return Iy.hasDOMNode(e,t)}):[]},O=b.closest('[data-slate-node="element"]');if("backward"===f||!f)for(var x=(B=Mg(Mg([],Lg(S(null==O?void 0:O.previousElementSibling)),!1),Lg(S(O)),!1)).length-1;x>=0;x-=1){var N=B[x];if(ky(b,N)){E=N,f="backward";break}}if(!(E||"forward"!==f&&f)){var B=Mg(Mg([],Lg(S(O)),!1),Lg(S(null==O?void 0:O.nextElementSibling)),!1);try{for(var T=_g(B),k=T.next();!k.done;k=T.next()){N=k.value;if(Fy(b,N)){E=N,f="forward";break}}}catch(e){r={error:e}}finally{try{k&&!k.done&&(o=T.return)&&o.call(T)}finally{if(r)throw r.error}}}E&&(p=E.closest('[data-slate-node="text"]'),w=E,"forward"===f?h=0:(h=w.textContent.length,w.querySelectorAll("[data-slate-zero-width]").forEach(function(e){h-=e.textContent.length})))}w&&h===w.textContent.length&&(d.hasAttribute("data-slate-zero-width")||Sy&&(null===(i=w.textContent)||void 0===i?void 0:i.endsWith("\n")))&&(h-=1)}if(!p){if(s)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var F,I=Iy.toSlateNode(e,p);try{F=Iy.findPath(e,I)}catch(e){if(s)return null;throw e}return{path:F,offset:h}},hasRange:function(e,t){var n=t.anchor,r=t.focus;return mh.hasPath(e,n.path)&&mh.hasPath(e,r.path)},getNodeType:function(e){return kp.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map(function(e){return _p.string(e)}).join("")},getSelectedElems:function(e){var t,n,r=[],o=mh.nodes(e,{universal:!0});try{for(var i=_g(o),a=i.next();!a.done;a=i.next()){var s=Lg(a.value,1)[0];kp.isElement(s)&&r.push(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},getSelectedNodeByType:function(e,t){var n=this,r=Lg(mh.nodes(e,{match:function(e){return n.checkNodeType(e,t)},universal:!0}),1),o=r[0];return null==o?null:o[0]},getSelectedTextNode:function(e){var t=Lg(mh.nodes(e,{match:function(e){return Nh.isText(e)},universal:!0}),1),n=t[0];return null==n?null:n[0]},isNodeSelected:function(e,t){var n=Lg(mh.nodes(e,{match:function(e){return e===t},universal:!0}),1),r=n[0];return null!=r&&Lg(r,1)[0]===t},isSelectionAtLineEnd:function(e,t){var n=e.selection;return!!n&&(mh.isEnd(e,n.anchor,t)||mh.isEnd(e,n.focus,t))},getTextarea:function(e){var t=cv.get(e);if(null==t)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return pv.get(e)||null},getHoverbar:function(e){return gv.get(e)||null},normalizeContent:function(e){e.children.forEach(function(t,n){e.normalizeNode([t,[n]])})},getLeftLengthOfMaxLength:function(e){var t=e.getConfig(),n=t.maxLength,r=t.onMaxLength;if("number"!=typeof n||n<=0)return 1/0;var o=n-e.getText().replace(/\r|\n|(\r\n)|(\n\r)/g,"").length;return o<=0&&r&&r(e),o},cleanExposedTexNodeInSelectionBlock:function(e){var t,n,r,o,i=Iy.getTextarea(e).$textArea,a=null==i?void 0:i[0].childNodes;if(a)try{for(var s=_g(Array.from(a)),u=s.next();!u.done;u=s.next()){var l=u.value;if(!Vm(l))break;l.remove()}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}var c=mh.nodes(e,{match:function(t){return!(!kp.isElement(t)||e.isInline(t))},universal:!0});try{for(var d=_g(c),f=d.next();!f.done;f=d.next()){var p=f.value;if(null!=p){var h=p[0];Ym(Iy.toDOMNode(e,h),function(e,t){var n=Zv(t);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||t.removeChild(e)})}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}},isLastNode:function(e,t){var n=e.children||[];return n[n.length-1]===t},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(e){var t,n,r=mh.nodes(e,{match:function(t){return e.isVoid(t)}}),o=0;try{for(var i=_g(r),a=i.next();!a.done;a=i.next()){a.value&&(o+=1)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return o>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(null==t)return!1;if(Bp.isExpanded(t))return!1;var n=Iy.getSelectedNodeByType(e,"paragraph");if(null===n)return!1;var r=n.children;return 1===r.length&&(""===r[0].text||void 0)},isEmptyPath:function(e,t){var n=mh.node(e,t);if(null==n)return!1;var r=Lg(n,1)[0].children;if(1===r.length&&""===r[0].text)return!0;return!1}};function Py(e,t){return kp.isElement(e)?by(e,t):function(e,t){var n=e.text;if(null==n)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=n;r=function(e){return e.replace(/ {2}/g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(r);var o=Iy.getParentsNodes(t,e).some(function(e){return"pre"===Iy.getNodeType(e)});if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/ /g," ")),""===r){var i=Iy.getParentNode(null,e);if(!i||0!==i.children.length)return r;r="<br>"}return hy.forEach(function(t){return r=t(e,r)}),r}(e,t)}var Ry=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},_y=function(e,t,n){var r=Iy.toDOMRange(e,t).getBoundingClientRect(),o=Iy.toDOMRange(e,n).getBoundingClientRect();return Ry(r,o)&&Ry(o,r)},Ly=function(e,t){var n,r,o=[];try{for(var i=_g(mh.levels(e,{at:t})),a=i.next();!a.done;a=i.next()){var s=Lg(a.value,2),u=s[0],l=s[1],c=Iy.findKey(e,u);o.push([l,c])}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o};function My(e,t){e.isInline(t)?(e.insertNode(t),"link"===t.type&&e.insertFragment([{text:""}])):Wh.insertNodes(e,t,{mode:"highest"})}var jy,Hy,zy,$y,Uy,Vy,Wy,Gy,qy,Ky,Yy,Xy,Zy,Jy,Qy,eb,tb,nb,rb,ob,ib,ab,sb,ub,lb,cb,db,fb,pb,hb,gb,vb,mb,yb,bb,Eb,wb,Cb,Db,Ab,Sb=function(e){var t=e,n=t.onChange,r=t.insertText,o=t.apply,i=t.deleteBackward,a=t.deleteFragment;return t.insertText=function(e){t.getConfig().readOnly||r(e)},t.apply=function(e){var n,r,i,a,s,u,l,c,d=[];switch(e.type){case"insert_text":case"remove_text":case"set_node":case"split_node":d.push.apply(d,Mg([],Lg(Ly(t,e.path)),!1));break;case"insert_node":case"remove_node":d.push.apply(d,Mg([],Lg(Ly(t,Cp.parent(e.path))),!1));break;case"merge_node":var f=Cp.previous(e.path);d.push.apply(d,Mg([],Lg(Ly(t,f)),!1));break;case"move_node":var p=Cp.common(Cp.parent(e.path),Cp.parent(e.newPath));d.push.apply(d,Mg([],Lg(Ly(t,p)),!1));break;case"set_selection":(null===(a=null===(i=e.newProperties)||void 0===i?void 0:i.focus)||void 0===a?void 0:a.path)&&(d.push.apply(d,Mg([],Lg(Ly(t,null===(u=null===(s=e.newProperties)||void 0===s?void 0:s.focus)||void 0===u?void 0:u.path)),!1)),d.push.apply(d,Mg([],Lg(Ly(t,null===(c=null===(l=e.properties)||void 0===l?void 0:l.focus)||void 0===c?void 0:c.path)),!1)))}o(e);try{for(var h=_g(d),g=h.next();!g.done;g=h.next()){var v=Lg(g.value,2),m=v[0],y=v[1],b=Lg(mh.node(t,m),1)[0];kv.set(b,y),"type"in b&&(Dv.has(b)&&Dv.delete(b),Av.has(b)&&Av.delete(b))}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}},t.deleteBackward=function(n){if("line"!==n)return i(n);if(e.selection&&Bp.isCollapsed(e.selection)){var r=mh.above(e,{match:function(t){return kp.isElement(t)&&mh.isBlock(e,t)},at:e.selection});if(r){var o=Lg(r,2)[1],a=mh.range(e,o,e.selection.anchor),s=function(e,t){var n=mh.range(e,Bp.end(t)),r=Array.from(mh.positions(e,{at:t})),o=0,i=r.length,a=Math.floor(i/2);if(_y(e,mh.range(e,r[o]),n))return mh.range(e,r[o],n);if(r.length<2)return mh.range(e,r[r.length-1],n);for(;a!==r.length&&a!==o;)_y(e,mh.range(e,r[a]),n)?i=a:o=a,a=Math.floor((o+i)/2);return mh.range(e,r[i],n)}(t,a);Bp.isCollapsed(s)||Wh.delete(e,{at:s})}}},t.deleteFragment=function(e){var n=function(e){var t=e.selection;if(null==t||Bp.isCollapsed(t))return!1;var n=Lg(Bp.edges(t),2),r=n[0],o=n[1],i=Lg(mh.edges(e,[]),2),a=i[0],s=i[1];return wh.equals(r,a)&&wh.equals(o,s)}(t);a(e),n&&(!function(e){var t=[{type:"paragraph",children:[{text:""}]}];mh.withoutNormalizing(e,function(){for(var n=e.children.length-1;n>=0;n-=1)Wh.removeNodes(e,{at:[n]});Wh.insertNodes(e,t,{at:[0]})})}(t),t.children.length>0&&Wh.select(t,mh.start(t,[])))},t.onChange=function(){var e=t.selection;null!=e&&Pv.set(t,e),t.emit(nv),n()},t.handleTab=function(){t.insertText(" ")},t.getHtml=function(){var e=t.children,n=void 0===e?[]:e,r=t.getConfig().skipCacheTypes,o=void 0===r?["list-item"]:r;return n.map(function(e){var n=Iy.getNodeType(e);if(o.includes(n))return Py(e,t);var r=Av.get(e);if(r)return r;var i=Py(e,t);return Av.set(e,i),i}).join("")},t.getText=function(){var e=t.children;return(void 0===e?[]:e).map(function(e){return _p.string(e)}).join("\n")},t.getSelectionText=function(){var n=t.selection;return null==n?"":mh.string(e,n)},t.getElemsByType=function(e,n){var r,o;void 0===n&&(n=!1);var i=[],a=mh.nodes(t,{at:[],universal:!0});try{for(var s=_g(a),u=s.next();!u.done;u=s.next()){var l=Lg(u.value,1)[0];if(kp.isElement(l))if(n?l.type.indexOf(e)>=0:l.type===e){var c=Iy.findKey(t,l),d=py(l.type,c.id);i.push(Ig(Ig({},l),{id:d}))}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i},t.getElemsByTypePrefix=function(e){return t.getElemsByType(e,!0)},t.isEmpty=function(){var e=t.children,n=void 0===e?[]:e;if(n.length>1)return!1;var r=n[0];if(null==r)return!0;if(!kp.isElement(r)||"paragraph"!==r.type)return!1;var o=r.children,i=void 0===o?[]:o;if(i.length>1)return!1;var a=i[0];return null==a||Nh.isText(a)&&""===a.text},t.clear=function(){Wh.delete(t,{at:{anchor:mh.start(t,[]),focus:mh.end(t,[])}}),0!==t.children.length?function(e){var t=e.children[0];if(1===e.children.length&&kp.isElement(t)&&("paragraph"!==t.type||""!==_p.string(t))&&""===_p.string(t)){var n=[{type:"paragraph",children:[{text:""}]}];mh.withoutNormalizing(e,function(){Wh.removeNodes(e,{at:[0]}),Wh.insertNodes(e,n,{at:[0]})})}}(t):Wh.insertNodes(t,[{type:"paragraph",children:[{text:""}]}])},t.getParentNode=function(e){return Iy.getParentNode(t,e)},t.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e){var r=document.createElement("div");r.innerHTML=e;var o=Array.from(r.childNodes);if(o=o.filter(function(e){var t=e.nodeName;return!!Vm(e)||!!$m(e)&&!Hv.has(t.toLowerCase())}),0!==o.length){var i=t.selection;if(null!=i){var a=null;if(Iy.isSelectedEmptyParagraph(t)&&!n)a=[i.focus.path[0]];r.setAttribute("hidden","true"),document.body.appendChild(r);var s=0;o.forEach(function(e,n){var r=e.nodeName,i=e.textContent,a=void 0===i?"":i;if(Vm(e)){if(!a||!a.trim())return;t.insertNode({text:a})}else if("BR"!==r){var u=e,l=!1;if(Qm.includes(r.toLowerCase()))l=!0;else for(var c in ny)if(u.matches(c)){l=!0;break}if(l){var d=cy(Zv(u),t);return Array.isArray(d)?(d.forEach(function(e){return My(t,e)}),s+=1):(My(t,d),s+=1),void(Iy.isSelectedVoidNode(t)&&t.move(1))}var f=window.getComputedStyle(u).display;if(!Iy.isSelectedEmptyParagraph(t)&&f.indexOf("inline")<0){if(n>=1)(function(e){return"matches"in e&&/^[ou]l$/i.test(e.tagName)&&!e.hasAttribute("data-w-e-type")})(o[n-1])&&t.insertBreak();t.insertBreak()}t.dangerouslyInsertHtml(u.innerHTML,!0)}else t.insertText("\n")}),s&&a&&Iy.isEmptyPath(t,a)&&Wh.removeNodes(t,{at:a}),r.remove()}}}},t.setHtml=function(e){void 0===e&&(e="");var n=t.isDisabled(),r=t.isFocused(),o=JSON.stringify(t.selection);t.enable(),t.focus(),t.clear();var i=fy(t,null==e?"":e);if(Wh.insertFragment(t,i),r||(t.deselect(),t.blur()),n&&(t.deselect(),t.disable()),t.isFocused())try{t.select(JSON.parse(o))}catch(e){t.select(mh.start(t,[]))}},t},Ob=1,xb=function(e){var t=e;return t.id="wangEditor-".concat(Ob),Ob+=1,t.isDestroyed=!1,t.isFullScreen=!1,t.focus=function(e){if(Iy.toDOMNode(t,t).focus({preventScroll:!0}),Iv.set(t,!0),e){var n=mh.end(t,[]);Wh.select(t,n)}else{var r=Pv.get(t);r?Wh.select(t,r):Wh.select(t,mh.start(t,[]))}},t.isFocused=function(){return!!Iv.get(t)},t.blur=function(){Iy.toDOMNode(t,t).blur(),Wh.deselect(t),Iv.set(t,!1)},t.updateView=function(){Iy.getTextarea(t).changeViewState();var e=Iy.getToolbar(t);e&&e.changeToolbarState();var n=Iy.getHoverbar(t);n&&n.changeHoverbarState()},t.destroy=function(){if(!t.isDestroyed){var e=Iy.getTextarea(t);e.destroy(),cv.delete(t),dv.delete(e);var n=Iy.getToolbar(t);n&&(n.destroy(),pv.delete(t),fv.delete(n));var r=Iy.getHoverbar(t);r&&(r.destroy(),gv.delete(t),hv.delete(r)),t.isDestroyed=!0,t.emit(tv)}},t.scrollToElem=function(e){if(!t.getConfig().scroll){var n="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return n+="\nYou has disabled editor scroll, please do this yourself",void console.warn(n)}var r=Zv("#".concat(e));if(0!==r.length){var o=r[0];if(!Iy.hasDOMNode(t,o)){n="Element (found by id is '".concat(e,"') is not in editor DOM");return n+="\n 通过 id '".concat(e,"' 找到的 element 不在 editor DOM 之内"),void console.error(n,o)}var i=Iy.getTextarea(t),a=i.$textAreaContainer,s=i.$scroll,u=r.offset().top,l=a.offset().top;s[0].scrollBy({top:u-l,behavior:"smooth"})}},t.showProgressBar=function(e){e<1||Iy.getTextarea(t).changeProgress(e)},t.hidePanelOrModal=function(){var e=mv.get(t);null!=e&&e.forEach(function(e){return e.hide()})},t.enable=function(){t.getConfig().readOnly=!1,t.updateView()},t.disable=function(){t.getConfig().readOnly=!0,t.updateView()},t.isDisabled=function(){return t.getConfig().readOnly},t.toDOMNode=function(e){return Iy.toDOMNode(t,e)},t.fullScreen=function(){if(!t.isFullScreen){var e=null,n=Iy.getToolbar(t);n&&(e=n.$box);var r=Iy.getTextarea(t).$box.parent();if(e&&e.parent()[0]!==r[0]){throw new Error("Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent\n不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致")}r.addClass("w-e-full-screen-container");var o=r.css("z-index");r.attr("data-z-index",o.toString()),t.isFullScreen=!0,t.emit(ov)}},t.unFullScreen=function(){if(t.isFullScreen){var e=Iy.getTextarea(t).$box.parent();setTimeout(function(){e.removeClass("w-e-full-screen-container"),t.isFullScreen=!1,t.emit(iv)},200)}},t.getEditableContainer=function(){return Iy.getTextarea(t).$textAreaContainer[0]},t},Nb={exports:{}},Bb={exports:{}};function Tb(){if(Hy)return jy;Hy=1;return jy=function(e){return null!=e}}function kb(){if(Vy)return Uy;Vy=1;var e=function(){if($y)return zy;$y=1;var e=Tb(),t={object:!0,function:!0,undefined:!0};return zy=function(n){return!!e(n)&&hasOwnProperty.call(t,typeof n)}}();return Uy=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(e){return!1}}}function Fb(){if(Ky)return qy;Ky=1;var e=function(){if(Gy)return Wy;Gy=1;var e=kb();return Wy=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(e){return!1}return!e(t)}}(),t=/^\s*class[\s{/}]/,n=Function.prototype.toString;return qy=function(r){return!!e(r)&&!t.test(n.call(r))}}function Ib(){if(nb)return tb;nb=1;var e=(eb?Qy:(eb=1,Qy=function(){}))();return tb=function(t){return t!==e&&null!==t},tb}function Pb(){return ab||(ab=1,ib=(Jy?Zy:(Jy=1,Zy=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}))()?Object.keys:function(){if(ob)return rb;ob=1;var e=Ib(),t=Object.keys;return rb=function(n){return t(e(n)?Object(n):n)}}()),ib}function Rb(){if(cb)return lb;cb=1;var e=Pb(),t=function(){if(ub)return sb;ub=1;var e=Ib();return sb=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}(),n=Math.max;return lb=function(r,o){var i,a,s,u=n(arguments.length,2);for(r=Object(t(r)),s=function(e){try{r[e]=o[e]}catch(e){i||(i=e)}},a=1;a<u;++a)e(o=arguments[a]).forEach(s);if(void 0!==i)throw i;return r},lb}function _b(){return fb?db:(fb=1,db=(Xy||(Xy=1,Yy=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}),Yy)()?Object.assign:Rb())}function Lb(){return Eb||(Eb=1,bb=function(){if(vb)return gb;vb=1;var e="razdwatrzy";return gb=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}}()()?String.prototype.contains:function(){if(yb)return mb;yb=1;var e=String.prototype.indexOf;return mb=function(t){return e.call(this,t,arguments[1])>-1},mb}()),bb}function Mb(){if(wb)return Bb.exports;wb=1;var e=Tb(),t=Fb(),n=_b(),r=function(){if(hb)return pb;hb=1;var e=Ib(),t=Array.prototype.forEach,n=Object.create;return pb=function(r){var o=n(null);return t.call(arguments,function(t){e(t)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(t),o)}),o},pb}(),o=Lb(),i=Bb.exports=function(t,i){var a,s,u,l,c;return arguments.length<2||"string"!=typeof t?(l=i,i=t,t=null):l=arguments[2],e(t)?(a=o.call(t,"c"),s=o.call(t,"e"),u=o.call(t,"w")):(a=u=!0,s=!1),c={value:i,configurable:a,enumerable:s,writable:u},l?n(r(l),c):c};return i.gs=function(i,a,s){var u,l,c,d;return"string"!=typeof i?(c=s,s=a,a=i,i=null):c=arguments[3],e(a)?t(a)?e(s)?t(s)||(c=s,s=void 0):s=void 0:(c=a,a=s=void 0):a=void 0,e(i)?(u=o.call(i,"c"),l=o.call(i,"e")):(u=!0,l=!1),d={get:a,set:s,configurable:u,enumerable:l},c?n(r(c),d):d},Bb.exports}var jb=(Ab||(Ab=1,function(e,t){var n,r,o,i,a,s,u,l=Mb(),c=Db?Cb:(Db=1,Cb=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}),d=Function.prototype.apply,f=Function.prototype.call,p=Object.create,h=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var n;return c(t),v.call(this,"__ee__")?n=this.__ee__:(n=m.value=p(null),h(this,"__ee__",m),m.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},r=function(e,t){var r,i;return c(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),d.call(t,this,arguments)}),r.__eeOnceListener__=t,this},o=function(e,t){var n,r,o,i;if(c(t),!v.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(r=n[e]))for(i=0;o=r[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===r.length?n[e]=r[i?0:1]:r.splice(i,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},i=function(e){var t,n,r,o,i;if(v.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;r=o[t];++t)d.call(r,this,i)}else switch(arguments.length){case 1:f.call(o,this);break;case 2:f.call(o,this,arguments[1]);break;case 3:f.call(o,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];d.call(o,this,i)}},a={on:n,once:r,off:o,emit:i},s={on:l(n),once:l(r),off:l(o),emit:l(i)},u=g({},s),e.exports=t=function(e){return null==e?p(u):g(Object(e),s)},t.methods=a}(Nb,Nb.exports)),Nb.exports),Hb=b(jb);function zb(e){var t=Rv.get(e);return null==t&&(t=Hb(),Rv.set(e,t)),t}var $b=new WeakMap;function Ub(e,t){var n=$b.get(e);null==n&&(n=new Set,$b.set(e,n)),n.add(t)}var Vb=function(e){var t=e;return t.on=function(e,n){var r=zb(t);if(r.on(e,n),"destroyed"===e&&Ub(t,n),"destroyed"!==e){var o=function(){return r.off(e,n)};r.on("destroyed",o),Ub(t,o)}},t.once=function(e,n){zb(t).once(e,n)},t.off=function(e,n){zb(t).off(e,n)},t.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=zb(t);if(o.emit.apply(o,Mg([e],Lg(n),!1)),"destroyed"===e){var i=function(e){return $b.get(e)||new Set}(t);i.forEach(function(e){return o.off("destroyed",e)}),function(e){$b.set(e,new Set)}(t)}},t};var Wb=function(e){var t=e;return t.setFragmentData=function(e){var n=t.selection;if(n){var r=Lg(Bp.edges(n),2),o=r[0],i=r[1],a=mh.void(t,{at:o.path}),s=mh.void(t,{at:i.path});if(!Bp.isCollapsed(n)||a){var u=Iy.toDOMRange(t,n),l=u.cloneContents(),c=l.childNodes[0];if(l.childNodes.forEach(function(e){e.textContent&&""!==e.textContent.trim()&&(c=e)}),s){var d=Lg(s,1)[0],f=u.cloneRange(),p=Iy.toDOMNode(t,d);f.setEndAfter(p),l=f.cloneContents()}if(a&&(c=l.querySelector("[data-slate-spacer]")),Array.from(l.querySelectorAll("[data-slate-zero-width]")).forEach(function(e){var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""}),Vm(c)){var h=c.ownerDocument.createElement("span");h.style.whiteSpace="pre",h.appendChild(c),l.appendChild(h),c=h}var g=t.getFragment(),v=JSON.stringify(g),m=window.btoa(encodeURIComponent(v));c.setAttribute("data-slate-fragment",m),e.setData("application/x-slate-fragment",m);var y=l.ownerDocument.createElement("div");return y.appendChild(l),y.setAttribute("hidden","true"),l.ownerDocument.body.appendChild(y),e.setData("text/html",y.innerHTML),e.setData("text/plain",Km(y)),l.ownerDocument.body.removeChild(y),e}}},t.insertData=function(e){var n=e.getData("application/x-slate-fragment");if(n){var r=decodeURIComponent(window.atob(n)),o=JSON.parse(r);t.insertFragment(o)}else{var i=e.getData("text/plain"),a=e.getData("text/html");if(a){var s=t.getConfig().sanitizeHtml;t.dangerouslyInsertHtml(s?s(a):a)}else if(i){if(!/[\r\n]/.test(i))return void t.insertText(i);var u=function(e){return e.replace(/\n\r|\r\n|\r/g,"\n").split("\n").map(function(e){return{type:"paragraph",children:[{text:e}]}})}(i);t.insertFragment(u)}}},t};function Gb(e){return e.replace(/\n\r|\r\n|\r|\n/g,"").length}function qb(e,t){var n,r;if(t<=0)return"";var o=t,i="";try{for(var a=_g(e),s=a.next();!s.done;s=a.next()){var u=s.value;if(/\r|\n/.test(u))i+=u;else{if(o<=0)break;i+=u,o-=1}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i}var Kb=function(e){var t=e,n=t.insertText,r=t.insertNode,o=t.insertFragment,i=t.dangerouslyInsertHtml;return t.insertText=function(e){if(t.getConfig().maxLength){var r=Iy.getLeftLengthOfMaxLength(t);r<=0||(r<e.length?n(e.slice(0,r)):n(e))}else n(e)},t.insertNode=function(e){if(t.getConfig().maxLength){var n=Iy.getLeftLengthOfMaxLength(t);if(!(n<=0))n<_p.string(e).length||r(e)}else r(e)},t.insertFragment=function(e){if(t.getConfig().maxLength){if(e.length>0){var n=e[0];if(Iy.getLeftLengthOfMaxLength(t)<_p.string(n).length)return;o([n]);for(var r=1;r<e.length;r+=1)t.insertNode(e[r])}}else o(e)},t.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e)if(t.getConfig().maxLength){var r=Iy.getLeftLengthOfMaxLength(t);if(!(r<=0)){var o=function(e,t){if(t<=0)return"";var n=document.createElement("div");n.innerHTML=e;var r=function(e){e.forEach(function(e){return e.remove()})},o=function(e){for(var n=Array.from(e.childNodes),i=0;i<n.length;i+=1){var a=n[i];if(Vm(a)){var s=a.textContent||"",u=Gb(s);if(u<=t){t-=u;continue}return a.textContent=qb(s,t),t=0,r(n.slice(i+1)),!1}if($m(a)){if(Hv.has(a.nodeName.toLowerCase())){a.remove();continue}if(!o(a))return r(n.slice(i+1)),!1}else a.remove()}return t>0};return o(n),n.innerHTML}(e,r);o&&i(o,n)}}else i(e,n)},t};function Yb(e){var t=Iy.getTextarea(e).$textAreaContainer,n=t.width(),r=t.height(),o=t.offset();return{top:o.top,left:o.left,width:n,height:r}}function Xb(e){var t={top:"0",left:"0"},n=e.selection;if(null==n)return t;var r=Yb(e);if(null==r)return t;var o=r.top,i=r.left,a=r.width,s=r.height,u=Iy.toDOMRange(e,n).getClientRects(),l=u?u[0]:null;if(null==l)return t;var c={},d=l.top-o,f=l.left-i;if(f>a/2){var p=a-f;c.right="".concat(p+5,"px")}else c.left="".concat(f+5,"px");if(d>s/2){var h=s-d;c.bottom="".concat(h+5,"px")}else{var g=u[u.length-1],v=g.top-o+g.height;v<0&&(v=0),c.top="".concat(v+5,"px")}return c}function Zb(e,t,n){void 0===n&&(n="modal");var r={top:"0",left:"0"};if(null==e.selection)return r;var o=kp.isElement(t)&&e.isVoid(t),i=kp.isElement(t)&&e.isInline(t),a=Tv.get(t);if(null==a)return r;var s=a.getBoundingClientRect(),u=s.top,l=s.left,c=s.height,d=s.width;if(o){var f=function(e){var t=[];t.push(e);for(var n=0;t.length>0;){var r=t.pop();if(null==r)break;if((n+=1)>1e4)break;var o=r.nodeName;if(r.nodeType===Rm.ELEMENT_NODE){var i=o.toLowerCase();if(km.includes(i)||"iframe"===i||"video"===i)return r;var a=r.children||[],s=a.length;if(s)for(var u=s-1;u>=0;u-=1)t.push(a[u])}}return null}(a);if(null!=f){var p=f.getBoundingClientRect();u=p.top,c=p.height}}var h=Yb(e);if(null==h)return r;var g=h.top,v=h.left,m=h.width,y=h.height,b={},E=u-g,w=l-v;if("bar"===n)return b.left="".concat(w,"px"),E>40?b.bottom="".concat(y-E+5,"px"):b.top="".concat(E+c+5,"px"),b;if("modal"===n){if(o?i?w>(m-d)/2?b.right="".concat(m-w+5,"px"):b.left="".concat(w+d+5,"px"):b.left="20px":b.left="".concat(w,"px"),o)(C=E)<0&&(C=0),b.top="".concat(C,"px");else if(E>(y-c)/2)b.bottom="".concat(y-E+5,"px");else{var C;(C=E+c)<0&&(C=0),b.top="".concat(C+5,"px")}return b}throw new Error("type '".concat(n,"' is invalid"))}function Jb(e,t){Im(function(){var n=Yb(e);if(null!=n){var r,o=n.top,i=n.left,a=n.width,s=n.height,u=t.offset(),l=u.top,c=u.left,d=t.width(),f=t.height(),p=l-o,h=c-i,g=t.attr("style");if(g.indexOf("top")>=0)if((r=p+f-s)>0){var v=t.css("top"),m=parseInt(v.toString(),10)-r;m<0&&(m=0),t.css("top","".concat(m,"px"))}if(g.indexOf("bottom")>=0&&l<0){var y=t.css("bottom"),b=parseInt(y.toString(),10)-Math.abs(l);t.css("bottom","".concat(b,"px"))}if(g.indexOf("left")>=0)if((r=h+d-a)>0){var E=t.css("left"),w=parseInt(E.toString(),10)-r;w<0&&(w=0),t.css("left","".concat(w,"px"))}if(g.indexOf("right")>=0&&c<0){var C=t.css("right"),D=parseInt(C.toString(),10)-Math.abs(c);t.css("right","".concat(D,"px"))}}})}var Qb,eE,tE=function(e){var t=e,n=t.select,r=t.deselect,o=t.move;return t.select=function(e){n(e)},t.deselect=function(){var e=t.selection,n=Iy.findDocumentOrShadowRoot(t).getSelection();n&&n.rangeCount>0&&Iy.hasDOMNode(t,n.anchorNode)&&Iy.hasDOMNode(t,n.focusNode)&&n.removeAllRanges(),e&&r()},t.move=function(e,t){void 0===t&&(t=!1),"number"==typeof e?e&&(e<0||o({distance:e,unit:"character",reverse:t})):o(e)},t.moveReverse=function(e){t.move(e,!0)},t.restoreSelection=function(){var e=Pv.get(t);null!=e&&(t.focus(),n(e))},t.getSelectionPosition=function(){return Xb(t)},t.getNodePosition=function(e){return Zb(t,e)},t.isSelectedAll=function(){var e=t.selection;if(null==e)return!1;var n=Lg(Bp.edges(e),2),r=n[0],o=n[1],i=Lg(mh.edges(t,[]),2),a=i[0],s=i[1];return!(!wh.equals(r,a)||!wh.equals(o,s))},t.selectAll=function(){var e=mh.start(t,[]),r=mh.end(t,[]);n({anchor:e,focus:r})},t};var nE=function(){if(eE)return Qb;eE=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,r=/^0o[0-7]+$/i,o=parseInt,i="object"==typeof y&&y&&y.Object===Object&&y,a="object"==typeof self&&self&&self.Object===Object&&self,s=i||a||Function("return this")(),u=Object.prototype.toString,l=Math.max,c=Math.min,d=function(){return s.Date.now()};function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function p(i){if("number"==typeof i)return i;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(i))return NaN;if(f(i)){var a="function"==typeof i.valueOf?i.valueOf():i;i=f(a)?a+"":a}if("string"!=typeof i)return 0===i?i:+i;i=i.replace(e,"");var s=n.test(i);return s||r.test(i)?o(i.slice(2),s?2:8):t.test(i)?NaN:+i}return Qb=function(e,t,n){var r,o,i,a,s,u,h=0,g=!1,v=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,i=o;return r=o=void 0,h=t,a=e.apply(i,n)}function b(e){var n=e-u;return void 0===u||n>=t||n<0||v&&e-h>=i}function E(){var e=d();if(b(e))return w(e);s=setTimeout(E,function(e){var n=t-(e-u);return v?c(n,i-(e-h)):n}(e))}function w(e){return s=void 0,m&&r?y(e):(r=o=void 0,a)}function C(){var e=d(),n=b(e);if(r=arguments,o=this,u=e,n){if(void 0===s)return function(e){return h=e,s=setTimeout(E,t),g?y(e):a}(u);if(v)return s=setTimeout(E,t),y(u)}return void 0===s&&(s=setTimeout(E,t)),a}return t=p(t)||0,f(n)&&(g=!!n.leading,i=(v="maxWait"in n)?l(p(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m),C.cancel=function(){void 0!==s&&clearTimeout(s),h=0,r=u=o=s=void 0},C.flush=function(){return void 0===s?a:w(d())},C},Qb}(),rE=b(nE);const oE=e=>"string"==typeof e,iE=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},aE=e=>null==e?"":""+e,sE=/###/g,uE=e=>e&&e.indexOf("###")>-1?e.replace(sE,"."):e,lE=e=>!e||oE(e),cE=(e,t,n)=>{const r=oE(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(lE(e))return{};const t=uE(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return lE(e)?{}:{obj:e,k:uE(r[o])}},dE=(e,t,n)=>{const{obj:r,k:o}=cE(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),s=cE(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=cE(e,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},fE=(e,t)=>{const{obj:n,k:r}=cE(e,t);if(n)return n[r]},pE=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?oE(e[r])||e[r]instanceof String||oE(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):pE(e[r],t[r],n):e[r]=t[r]);return e},hE=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var gE={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const vE=e=>oE(e)?e.replace(/[&<>"'\/]/g,e=>gE[e]):e;const mE=[" ",",","?","!",";"],yE=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),bE=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let e=0;e<r.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let a=e;a<r.length;++a)if(a!==e&&(i+=n),i+=r[a],t=o[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}o=t}return o},EE=e=>e&&e.replace("_","-"),wE={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class CE{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||wE,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(oE(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new CE(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new CE(this.logger,e)}}var DE=new CE;class AE{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(e=>{let[t,r]=e;for(let e=0;e<r;e++)t(...n)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(t=>{let[r,o]=t;for(let t=0;t<o;t++)r.apply(r,[e,...n])})}}}class SE extends AE{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):oE(n)&&o?a.push(...n.split(o)):a.push(n)));const s=fE(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&oE(n)?bE(this.data&&this.data[e]&&this.data[e][t],n,o):s}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),dE(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)(oE(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=fE(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?pE(s,n,o):s={...s,...n},dE(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var OE={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,o))}),t}};const xE={};class NE extends AE{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=DE.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=mE.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const o=yE.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:oE(o)?[o]:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return{key:e,namespaces:oE(o)?[o]:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],u=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(l){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:i}const c=this.resolve(e,t);let d=c&&c.res;const f=c&&c.usedKey||i,p=c&&c.exactUsedKey||i,h=Object.prototype.toString.apply(d),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,m=!oE(d)&&"boolean"!=typeof d&&"number"!=typeof d;if(!(v&&d&&m&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0)||oE(g)&&Array.isArray(d))if(v&&oE(g)&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,a=!1;const l=void 0!==t.count&&!oE(t.count),f=NE.hasDefaultValue(t),p=l?this.pluralResolver.getSuffix(u,t.count,t):"",h=t.ordinal&&l?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",g=l&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),v=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${p}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=v),this.isValidLookup(d)||(a=!0,d=i);const m=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,y=f&&v!==d&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",u,s,i,y?v:d),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const o=f&&r!==d?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,o,y,t),this.emit("missingKey",e,s,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?e.forEach(e=>{const n=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach(n=>{r([e],i+n,t[`defaultValue${n}`]||v)})}):r(e,i,v))}d=this.extendTranslation(d,e,t,c,n),a&&d===i&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,r?d:void 0):this.options.parseMissingKeyHandler(d))}else{if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(o){const e=Array.isArray(d),n=e?[]:{},r=e?p:f;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const i=`${r}${o}${e}`;n[e]=this.translate(i,{...t,joinArrays:!1,ns:a}),n[e]===i&&(n[e]=d[e])}d=n}}return r?(c.res=d,c.usedParams=this.getUsedParamsDetails(t),c):d}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a=oE(e)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let u=n.replace&&!oE(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):i.translate(...r,t)},n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s=oE(a)?[a]:a;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=OE.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return oE(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),u=s.key;n=u;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==a.count&&!oE(a.count),d=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&(oE(a.context)||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach(e=>{this.isValidLookup(t)||(i=e,!xE[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(xE[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(n=>{if(this.isValidLookup(t))return;o=n;const i=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,u,n,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(u+e),a.ordinal&&0===e.indexOf(r)&&i.push(u+e.replace(r,this.options.pluralSeparator)),d&&i.push(u+t)),f){const n=`${u}${this.options.contextSeparator}${a.context}`;i.push(n),c&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),d&&i.push(n+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))}))})}),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!oE(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}const BE=e=>e.charAt(0).toUpperCase()+e.slice(1);class TE{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=DE.create("languageUtils")}getScriptPartFromCode(e){if(!(e=EE(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=EE(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(oE(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(e){}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(e=>e.toLowerCase()):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=BE(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=BE(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=BE(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),oE(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return oE(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):oE(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}let kE=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],FE={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const IE=["v1","v2","v3"],PE=["v4"],RE={zero:0,one:1,two:2,few:3,many:4,other:5};class _E{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=DE.create("pluralResolver"),this.options.compatibilityJSON&&!PE.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const e={};return kE.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:FE[t.fc]}})}),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){const n=EE("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(n){if(!e.match(/-|_/))return;const r=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(r,t)}return this.pluralRulesCache[o]=i,i}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((e,t)=>RE[e]-RE[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):n.numbers.map(n=>this.getSuffix(e,n,t)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!IE.includes(this.options.compatibilityJSON)}}const LE=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((e,t,n)=>{const r=fE(e,n);return void 0!==r?r:fE(t,n)})(e,t,n);return!i&&o&&oE(n)&&(i=bE(e,n,r),void 0===i&&(i=bE(t,n,r))),i},ME=e=>e.replace(/\$/g,"$$$$");class jE{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=DE.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:u,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:vE,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?hE(o):i||"{{",this.suffix=a?hE(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=d?hE(d):f||hE("$t("),this.nestingSuffix=p?hE(p):h||hE(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const o=LE(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(LE(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const l=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,d=[{regex:this.regexpUnescape,safeValue:e=>ME(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?ME(this.escape(e)):ME(e)}];return d.forEach(t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=u(n),void 0===i)if("function"==typeof l){const t=l(e,o,r);i=oE(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else oE(i)||this.useRawValueToEscape||(i=aE(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];o={...i},o=o.replace&&!oE(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map(e=>e.trim());n[1]=e.shift(),s=e,u=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&!oE(r))return r;oE(r)||(r=aE(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),u&&(r=s.reduce((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const HE=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(EE(r),o),t[a]=s),s(n)}};class zE{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=DE.create("formatter"),this.options=e,this.formats={number:HE((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:HE((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:HE((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:HE((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:HE((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=HE(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(e=>e.indexOf(")")>-1)){const e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}const i=o.reduce((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e);return i}}class $E extends AE{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=DE.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const o={},i={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:o}=cE(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();oE(e)&&(e=this.languageUtils.toResolveHierarchy(e)),oE(t)&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let o;o=5===u.length?u(e,t,n,r,s):u(e,t,n,r),o&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else u(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}const UE=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),oE(e[1])&&(t.defaultValue=e[1]),oE(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),VE=e=>(oE(e.ns)&&(e.ns=[e.ns]),oE(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),oE(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),WE=()=>{};class GE extends AE{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=VE(e),this.services={},this.logger=DE,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(oE(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=UE();this.options={...r,...this.options,...VE(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?DE.init(o(this.modules.logger),this.options):DE.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=zE);const n=new TE(this.options);this.store=new SE(this.options.resources,this.options);const i=this.services;i.logger=DE,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new _E(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new jE(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new $E(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)}),this.modules.languageDetector&&(i.languageDetector=o(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=o(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new NE(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=WE),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});const i=iE(),a=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:WE;const n=oE(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>r(e))}this.options.preload&&this.options.preload.forEach(e=>r(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,n){const r=iE();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=WE),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&OE.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=iE();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve(function(){return n.t(...arguments)}),t&&t(e,function(){return n.t(...arguments)})},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n=oE(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,e=>{i(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else i={...t};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const l=r.options.keySeparator||".";let c;return c=i.keyPrefix&&Array.isArray(e)?e.map(e=>`${i.keyPrefix}${l}${e}`):i.keyPrefix?`${i.keyPrefix}${l}${e}`:e,r.t(c,i)};return oE(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=iE();return this.options.ns?(oE(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=iE();oE(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new TE(UE());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new GE(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:WE;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new GE(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));return["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new SE(this.store.data,r),o.services.resourceStore=o.store),o.translator=new NE(o.services,r),o.translator.on("*",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit(e,...n)}),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const qE=GE.createInstance();qE.createInstance=GE.createInstance,qE.createInstance,qE.dir,qE.init,qE.loadResources,qE.reloadResources,qE.use,qE.changeLanguage,qE.getFixedT,qE.t,qE.exists,qE.setDefaultNamespace,qE.hasLoadedNamespace,qE.loadNamespaces,qE.loadLanguages;var KE="translation";function YE(e,t){qE.addResourceBundle(e,KE,t,!0,!0)}function XE(e){qE.changeLanguage(e)}function ZE(e){return qE.getResourceBundle(e,KE)}function JE(e){return qE.on("languageChanged",e),function(){return qE.off("languageChanged",e)}}qE.init({lng:"zh-CN",resources:{}});var QE=qE.t.bind(qE);function ew(e){if(e.removeAttr){e.removeAttr("width"),e.removeAttr("height"),e.removeAttr("fill"),e.removeAttr("class"),e.removeAttr("t"),e.removeAttr("p-id");var t=e.children();t.length&&ew(t)}}function tw(){return Zv('<svg viewBox="0 0 1024 1024"><path d="M498.7 655.8l-197.6-268c-8.1-10.9-0.3-26.4 13.3-26.4h395.2c13.6 0 21.4 15.4 13.3 26.4l-197.6 268c-6.6 9-20 9-26.6 0z"></path></svg>')}function nw(){return Zv('<div class="w-e-bar-divider"></div>')}function rw(e,t,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),t){if(r){var i=Ay?"cmd":"ctrl";r=r.replace("mod",i)}if(o)r&&(e.attr("data-tooltip",r),e.addClass("w-e-menu-tooltip-v5"),e.addClass("tooltip-right"));else{var a=r?"".concat(n,"\n").concat(r):n;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}var ow=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=Zv('<div class="w-e-bar-item"></div>'),this.$button=Zv('<button type="button"></button>'),this.disabled=!1,this.menu=t;var o=t.tag,i=t.width;if("button"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'button'"));var a=t.title,s=t.hotkey,u=void 0===s?"":s,l=t.iconSvg,c=void 0===l?"":l,d=this.$button;if(c){var f=Zv(c);ew(f),d.append(f)}else d.text(a);rw(d,c,a,u,n),n&&c&&d.append(Zv('<span class="title">'.concat(a,"</span>"))),i&&d.css("width","".concat(i,"px")),d.attr("data-menu-key",e),this.$elem.append(d),Im(function(){return r.init()})}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(t){t.preventDefault(),yw(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())})},e.prototype.exec=function(){var e=yw(this),t=this.menu,n=t.getValue(e);this.setIcon(),this.setTooltip(),t.exec(e,n)},e.prototype.setActive=function(){var e=yw(this),t=this.$button,n="active";this.menu.isActive(e)?t.addClass(n):t.removeClass(n)},e.prototype.setDisabled=function(){var e=yw(this),t=this.$button,n=this.menu.isDisabled(e);(null==e.selection||e.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var r="disabled";n?t.addClass(r):t.removeClass(r),this.disabled=n},e.prototype.setIcon=function(){var e=yw(this),t=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(e);if(n){t.find("svg").remove();var r=Zv(n);ew(r),t.append(r)}}},e.prototype.setTooltip=function(){var e=yw(this),t=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(e),r=this.menu.iconSvg;n&&r&&rw(t,r,n)}},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),iw=function(e){function t(t,n,r){return void 0===r&&(r=!1),e.call(this,t,n,r)||this}return Fg(t,e),t.prototype.onButtonClick=function(){},t}(ow),aw=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=mv.get(e);null==t&&(t=new Set,mv.set(e,t)),t.add(this),yv.set(this,e)},e.prototype.renderContent=function(e){var t=this.$elem;t.empty(),t.append(e);var n=this.genSelfElem();n&&t.append(n)},e.prototype.appendTo=function(e){var t=this.$elem;e.append(t)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var e=yv.get(this);e&&e.emit(av,this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=yv.get(this);e&&e.emit(sv)}},e}(),sw=function(e){function t(t){var n=e.call(this,t)||this;return n.type="dropPanel",n.$elem=Zv('<div class="w-e-drop-panel"></div>'),n}return Fg(t,e),t.prototype.genSelfElem=function(){return null},t}(aw),uw=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;if(o.dropPanel=null,o.menu=n,n.showDropPanel){var i=tw();o.$button.append(i)}return o}return Fg(t,e),t.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},t.prototype.handleDropPanel=function(){var e=this.menu;if(null!=e.getPanelContentElem){var t=yw(this);if(null==this.dropPanel){var n=new sw(t),r=e.getPanelContentElem(t);n.renderContent(r),n.appendTo(this.$elem),n.show(),this.dropPanel=n}else{var o=this.dropPanel;if(o.isShow)o.hide();else{r=e.getPanelContentElem(t);o.renderContent(r),o.show()}}var i=this.dropPanel;if(i.isShow){var a=this.$elem,s=a.offset().left,u=a.parents(".w-e-bar");s-u.offset().left>=u.width()/2?i.$elem.css({left:"none",right:"0"}):i.$elem.css({left:"0",right:"none"})}}},t}(ow),lw=function(e){function t(t,n){void 0===n&&(n=0);var r=e.call(this,t)||this;r.type="modal",r.$elem=Zv('<div class="w-e-modal"></div>'),r.width=0,n&&(r.width=n);var o=r.$elem;return o.on("click",function(e){return e.stopPropagation()}),o.on("keyup",function(e){"Escape"===e.code&&(r.hide(),t.restoreSelection())}),r}return Fg(t,e),t.prototype.genSelfElem=function(){var e=this,t=Zv('<span class="btn-close">'.concat('<svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg>',"</span>")),n=yv.get(this);return t.on("click",function(){e.hide(),null==n||n.restoreSelection()}),t},t.prototype.setStyle=function(e){var t=this.width,n=this.$elem;n.attr("style",""),t&&n.css("width","".concat(t,"px")),n.css(e)},t}(aw);function cw(e,t,n){var r=Zv('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=Zv('<input type="text" id="'.concat(t,'" placeholder="').concat(n||"",'">'));return r.append(o),[r[0],o[0]]}function dw(e,t,n){var r=Zv('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=Zv('<textarea type="text" id="'.concat(t,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(o),[r[0],o[0]]}function fw(e,t){var n=Zv('<div class="button-container"></div>'),r=Zv('<button type="button" id="'.concat(e,'">').concat(t,"</button>"));return n.append(r),[n[0],r[0]]}var pw=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;return o.$body=Zv("body"),o.modal=null,o.menu=n,o}return Fg(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var e=yw(this),t=this.menu.getModalPositionNode(e);return kp.isElement(t)?Zb(e,t,"modal"):Xb(e)},t.prototype.handleModal=function(){var e=yw(this),t=this.menu;if(null==this.modal){var n=new lw(e,t.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else{(n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)}},t.prototype.renderAndShowModal=function(e,t){void 0===t&&(t=!1);var n=yw(this),r=this.menu;if(null!=r.getModalContentElem){var o=Iy.getTextarea(n),i=Iy.getToolbar(n),a=((null==i?void 0:i.getConfig())||{}).modalAppendToBody,s=r.getModalContentElem(n);if(e.renderContent(s),a)e.setStyle({left:"0",right:"0"});else{var u=this.getPosition();e.setStyle(u)}t&&(a?e.appendTo(this.$body):e.appendTo(o.$textAreaContainer)),e.show(),a||Jb(n,e.$elem),setTimeout(function(){n.blur()})}},t}(ow);var hw=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="selectList",r.$elem=Zv('<div class="w-e-select-list"></div>'),n&&r.$elem.css("width","".concat(n,"px")),r.$elem.on("click",function(e){e.stopPropagation()}),r}return Fg(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var n=Zv("<ul></ul>");e.forEach(function(e){var t=e.value,r=e.text,o=e.selected,i=e.styleForRenderMenuList,a=Zv('<li data-value="'.concat(t,'"></li>'));if(i&&a.css(i),o){var s=Zv('<svg viewBox="0 0 1446 1024"><path d="M574.116299 786.736392 1238.811249 48.517862C1272.390222 11.224635 1329.414799 7.827718 1366.75664 41.450462 1403.840015 74.840484 1406.731043 132.084741 1373.10189 169.433699L655.118888 966.834607C653.072421 969.716875 650.835807 972.514337 648.407938 975.210759 615.017957 1012.29409 558.292155 1015.652019 521.195664 982.250188L72.778218 578.493306C35.910826 545.297758 32.859041 488.584019 66.481825 451.242134 99.871807 414.158803 156.597563 410.800834 193.694055 444.202665L574.116299 786.736392Z"></path></svg>');a.append(s),a.addClass("selected")}a.append(Zv('<span data-value="'.concat(t,'">').concat(r,"</span>"))),a.attr("title",r),n.append(a)}),t.append(n)},t.prototype.genSelfElem=function(){return null},t}(aw);var gw=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=Zv('<div class="w-e-bar-item"></div>'),this.$button=Zv('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var o=t.tag,i=t.title,a=t.width,s=t.iconSvg,u=void 0===s?"":s,l=t.hotkey,c=void 0===l?"":l;if("select"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'select'"));var d=this.$button;a&&d.css("width","".concat(a,"px")),d.attr("data-menu-key",e),rw(d,u,i,c,n),this.$elem.append(d),this.menu=t,Im(function(){return r.init()})}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",function(t){t.preventDefault(),yw(e).hidePanelOrModal(),e.trigger()})},e.prototype.trigger=function(){var e=this,t=yw(this);if(!t.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new hw(t,n.selectPanelWidth);var r=this.selectList,o=n.getOptions(t);r.renderList(o),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",function(t){var n=t.target;if(null!=n){t.preventDefault();var r=Zv(n).attr("data-value");e.onChange(r)}})}else{if((r=this.selectList).isShow)r.hide();else{o=n.getOptions(t);r.renderList(o),r.show()}}}},e.prototype.onChange=function(e){var t=yw(this),n=this.menu;n.exec&&n.exec(t,e)},e.prototype.setSelectedValue=function(){var e=yw(this),t=this.menu,n=t.getValue(e),r=function(e,t){for(var n=e.length,r="",o=0;o<n;o++){var i=e[o];if(i.value===t){r=i.text;break}}return r}(t.getOptions(e),n.toString()),o=this.$button,i=tw();o.empty(),o.text(r),o.append(i)},e.prototype.setDisabled=function(){var e=yw(this),t=this.menu.isDisabled(e),n=this.$button;(null==e.selection||e.isDisabled())&&(t=!0);var r="disabled";t?n.addClass(r):n.removeClass(r),this.disabled=t},e.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},e}(),vw=function(){function e(e){this.$elem=Zv('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=Zv('<div class="w-e-bar-item-menus-container"></div>'),this.$button=Zv('<button type="button"></button>');var t=e.key,n=e.iconSvg,r=e.title,o=this.$elem,i=this.$button;if(n){var a=Zv(n);ew(a),i.append(a)}else i.text(r);i.attr("data-menu-key",t);var s=tw();i.append(s),o.append(i);var u=this.$container;o.append(u);var l=this.createObserver();this.observe(l)}return e.prototype.appendBarItem=function(e){var t=e.$elem;this.$container.append(t)},e.prototype.observe=function(e){var t=this.$container;e.observe(t[0],{childList:!0,subtree:!0,attributes:!0})},e.prototype.createObserver=function(){var e=this,t=this.$container,n=this.$button,r=new MutationObserver(function(){var o=t.find("button"),i=o.length;if(0!==i){var a=0;o.each(function(e){Zv(e).hasClass("disabled")&&a++}),r.disconnect(),a===i?n.addClass("disabled"):n.removeClass("disabled"),e.observe(r)}});return r},e}(),mw=new WeakMap;function yw(e){var t=vv.get(e);if(null==t)throw new Error("Can not get editor instance");return t}function bw(e,t,n){void 0===n&&(n=!1);var r=mw.get(t);if(r)return r;var o=t.tag;if("button"===o){var i=t.showDropPanel,a=t.showModal;r=i?new uw(e,t,n):a?new pw(e,t,n):new iw(e,t,n)}if("select"===o&&(r=new gw(e,t,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(t)));return mw.set(t,r),r}function Ew(e,t){var n=e.selection;return null!=n&&(!Bp.isCollapsed(n)&&(!Iy.getSelectedElems(e).some(function(t){if(e.isVoid(t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)})&&!!Nh.isText(t)))}var ww,Cw,Dw=function(){function e(){var e=this;this.$elem=Zv('<div class="w-e-bar w-e-bar-hidden w-e-hover-bar"></div>'),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null,this.isShow=!1,this.lngListen=function(){},this.changeHoverbarState=rE(function(){var t=e.isShow,n=e.getSelectedNodeAndMenuKeys()||{},r=n.node,o=void 0===r?null:r,i=n.menuKeys,a=void 0===i?[]:i,s=e.getEditorInstance();if(null!=o&&e.changeItemsState(),o&&kp.isElement(o)&&t){var u=e.isSamePath(o,e.prevSelectedNode);if(!mh.isBlock(s,o)&&u)return}e.hideAndClean(),null!=o&&(e.registerItems(a),e.setPosition(o),e.show()),e.prevSelectedNode=o},200),Im(function(){var t=e.getEditorInstance(),n=e.$elem;n.on("mousedown",function(e){return e.preventDefault()},{passive:!1}),Iy.getTextarea(t).$textAreaContainer.append(n),t.on(nv,e.changeHoverbarState);var r=e.hideAndClean.bind(e);t.on(rv,r),t.on(ov,r),t.on(iv,r)}),this.lngListen=JE(function(){e.menus={},e.hideAndClean(),e.getEditorInstance().deselect()})}return e.prototype.getMenus=function(){return this.menus},e.prototype.hideAndClean=function(){var e=this.$elem;e.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],e.empty(),this.isShow=!1},e.prototype.checkPositionBottom=function(){var e=this.$elem,t=!1,n="undefined"!=typeof window?window.innerHeight:null;n&&n>=360&&(n-e[0].getBoundingClientRect().bottom<360&&(t=!0));t?e.addClass("w-e-bar-bottom"):e.removeClass("w-e-bar-bottom")},e.prototype.show=function(){this.$elem.removeClass("w-e-bar-hidden").addClass("w-e-bar-show"),this.isShow=!0,this.checkPositionBottom()},e.prototype.changeItemsState=function(){var e=this;Im(function(){e.hoverbarItems.forEach(function(e){e.changeMenuState()})})},e.prototype.registerItems=function(e){var t=this,n=this.$elem;e.forEach(function(e){if("|"!==e)t.registerSingleItem(e);else{var r=nw();n.append(r)}})},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),n=this.menus,r=n[e];if(null==r){var o=uv[e];if(null==o)throw new Error("Not found menu item factory by key '".concat(e,"'"));if("function"!=typeof o)throw new Error("Menu item factory (key='".concat(e,"') is not a function"));r=o(),n[e]=r}var i=t.getMenuConfig(e);i&&void 0!==i.iconSvg&&(r.iconSvg=i.iconSvg);var a=bw(e,r);this.hoverbarItems.push(a),vv.set(a,t),this.$elem.append(a.$elem)},e.prototype.setPosition=function(e){var t=this.getEditorInstance(),n=this.$elem;if(n.attr("style",""),kp.isElement(e)){var r=Zb(t,e,"bar");return n.css(r),void Jb(t,n)}if(Nh.isText(e)){r=Xb(t);return n.css(r),void Jb(t,n)}throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},e.prototype.getSelectedNodeAndMenuKeys=function(){var e=this.getEditorInstance();if(null==e.selection)return null;var t=this.getHoverbarKeysConf(),n=null,r=[],o=function(o){var i=t[o],a=i.match,s=i.menuKeys,u=void 0===s?[]:s,l=a||function(e,t){return Iy.checkNodeType(t,o)},c=Lg(mh.nodes(e,{match:function(t){return l(e,t)},universal:!0}),1),d=c[0];if(null!=d)return n=d[0],r=u,"break"};for(var i in t){if("break"===o(i))break}return null==n||0===r.length?null:{node:n,menuKeys:r}},e.prototype.getEditorInstance=function(){var e=hv.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.getHoverbarKeysConf=function(){var e=this.getEditorInstance().getConfig().hoverbarKeys,t=void 0===e?{}:e,n=t.text;return n&&null==n.match&&(n.match=Ew),t},e.prototype.isSamePath=function(e,t){if(null==e||null==t)return!1;var n=Iy.findPath(null,e),r=Iy.findPath(null,t);return Cp.equals(n,r)},e.prototype.destroy=function(){var e;this.changeHoverbarState.cancel(),this.$elem.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},e}();function Aw(){if(Cw)return ww;Cw=1;var e="Expected a function",t=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,o=/^0o[0-7]+$/i,i=parseInt,a="object"==typeof y&&y&&y.Object===Object&&y,s="object"==typeof self&&self&&self.Object===Object&&self,u=a||s||Function("return this")(),l=Object.prototype.toString,c=Math.max,d=Math.min,f=function(){return u.Date.now()};function p(t,n,r){var o,i,a,s,u,l,p=0,v=!1,m=!1,y=!0;if("function"!=typeof t)throw new TypeError(e);function b(e){var n=o,r=i;return o=i=void 0,p=e,s=t.apply(r,n)}function E(e){var t=e-l;return void 0===l||t>=n||t<0||m&&e-p>=a}function w(){var e=f();if(E(e))return C(e);u=setTimeout(w,function(e){var t=n-(e-l);return m?d(t,a-(e-p)):t}(e))}function C(e){return u=void 0,y&&o?b(e):(o=i=void 0,s)}function D(){var e=f(),t=E(e);if(o=arguments,i=this,l=e,t){if(void 0===u)return function(e){return p=e,u=setTimeout(w,n),v?b(e):s}(l);if(m)return u=setTimeout(w,n),b(l)}return void 0===u&&(u=setTimeout(w,n)),s}return n=g(n)||0,h(r)&&(v=!!r.leading,a=(m="maxWait"in r)?c(g(r.maxWait)||0,n):a,y="trailing"in r?!!r.trailing:y),D.cancel=function(){void 0!==u&&clearTimeout(u),p=0,o=l=i=u=void 0},D.flush=function(){return void 0===u?s:C(f())},D}function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(h(e)){var a="function"==typeof e.valueOf?e.valueOf():e;e=h(a)?a+"":a}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(t,"");var s=r.test(e);return s||o.test(e)?i(e.slice(2),s?2:8):n.test(e)?NaN:+e}return ww=function(t,n,r){var o=!0,i=!0;if("function"!=typeof t)throw new TypeError(e);return h(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),p(t,n,{leading:o,maxWait:n,trailing:i})}}var Sw=b(Aw());function Ow(e,t){return Hm(t)&&Iy.hasDOMNode(e,t,{editable:!0})}function xw(e,t){return Hm(t)&&Iy.hasDOMNode(e,t)}function Nw(e,t){return Ow(e,t)||function(e,t){if(e.getConfig().readOnly)return!1;var n=xw(e,t)&&Iy.toSlateNode(e,t);return!!n&&kp.isElement(n)&&mh.isVoid(e,n)}(e,t)}const Bw=e=>"object"==typeof e&&null!=e&&1===e.nodeType,Tw=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,kw=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return Tw(n.overflowY,t)||Tw(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},Fw=(e,t,n,r,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0,Iw=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},Pw=(e,t)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=t,d="function"==typeof l?l:e=>e!==l;if(!Bw(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,p=[];let h=e;for(;Bw(h)&&d(h);){if(h=Iw(h),h===f){p.push(h);break}null!=h&&h===document.body&&kw(h)&&!kw(document.documentElement)||null!=h&&kw(h,c)&&p.push(h)}const g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,v=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:m,scrollY:y}=window,{height:b,width:E,top:w,right:C,bottom:D,left:A}=e.getBoundingClientRect(),{top:S,right:O,bottom:x,left:N}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let B="start"===s||"nearest"===s?w-S:"end"===s?D+x:w+b/2-S+x,T="center"===u?A+E/2-N+O:"end"===u?C+O:A-N;const k=[];for(let e=0;e<p.length;e++){const t=p[e],{height:n,width:r,top:o,right:i,bottom:l,left:c}=t.getBoundingClientRect();if("if-needed"===a&&w>=0&&A>=0&&D<=v&&C<=g&&(t===f&&!kw(t)||w>=o&&D<=l&&A>=c&&C<=i))return k;const d=getComputedStyle(t),h=parseInt(d.borderLeftWidth,10),S=parseInt(d.borderTopWidth,10),O=parseInt(d.borderRightWidth,10),x=parseInt(d.borderBottomWidth,10);let N=0,F=0;const I="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-O:0,P="offsetHeight"in t?t.offsetHeight-t.clientHeight-S-x:0,R="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,_="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)N="start"===s?B:"end"===s?B-v:"nearest"===s?Fw(y,y+v,v,S,x,y+B,y+B+b,b):B-v/2,F="start"===u?T:"center"===u?T-g/2:"end"===u?T-g:Fw(m,m+g,g,h,O,m+T,m+T+E,E),N=Math.max(0,N+y),F=Math.max(0,F+m);else{N="start"===s?B-o-S:"end"===s?B-l+x+P:"nearest"===s?Fw(o,l,n,S,x+P,B,B+b,b):B-(o+n/2)+P/2,F="start"===u?T-c-h:"center"===u?T-(c+r/2)+I/2:"end"===u?T-i+O+I:Fw(c,i,r,h,O+I,T,T+E,E);const{scrollLeft:e,scrollTop:a}=t;N=0===_?0:Math.max(0,Math.min(a+N/_,t.scrollHeight-n/_+P)),F=0===R?0:Math.max(0,Math.min(e+F/R,t.scrollWidth-r/R+I)),B+=a-N,T+=e-F}k.push({el:t,top:N,left:F})}return k};function Rw(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(Pw(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:i,left:a}of Pw(e,(e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"})(t))){const e=i-n.top+n.bottom,t=a-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}function _w(e){null!=e.selection&&(e.selection=null,e.onChange())}function Lw(e,t,n){void 0===n&&(n=!1);var r=t.selection,o=t.getConfig(),i=Iy.findDocumentOrShadowRoot(t).getSelection();if(i&&(!e.isComposing||n)&&t.isFocused()){var a="None"!==i.type;if(r||a){var s=xv.get(t),u=!1;if(s.contains(i.anchorNode)&&s.contains(i.focusNode)&&(u=!0),a&&u&&r){var l=Iy.toSlateRange(t,i,{exactMatch:!0,suppressThrow:!0});if(l&&Bp.equals(l,r)){var c=!0;if(Bp.isCollapsed(r)){var d=i.anchorNode,f=i.anchorOffset;if(d===s){var p=s.childNodes,h=void 0;(h=p[f])&&h.matches("table")&&(c=!1),(h=p[f-1])&&h.matches("table")&&(c=!1)}}if(c)return}}if(!r||Iy.hasRange(t,r)){e.isUpdatingSelection=!0;var g=r&&Iy.toDOMRange(t,r);if(g){Bp.isBackward(r)?i.setBaseAndExtent(g.endContainer,g.endOffset,g.startContainer,g.startOffset):i.setBaseAndExtent(g.startContainer,g.startOffset,g.endContainer,g.endOffset);var v=g.startContainer.parentElement;if(!v.closest("[data-slate-spacer]")&&g.getBoundingClientRect){var m=g.getBoundingClientRect.bind(g)();0===m.top&&0===m.right&&0===m.bottom&&0===m.left&&0===m.height&&0===m.width||(v.getBoundingClientRect=g.getBoundingClientRect.bind(g));var y=document.body;Rw(v,{scrollMode:"if-needed",boundary:o.scroll&&s.parentElement||y,block:"end",behavior:"smooth"}),delete v.getBoundingClientRect}}else i.removeAllRanges();setTimeout(function(){g&&Sy&&s.focus(),e.isUpdatingSelection=!1})}else t.selection=Iy.toSlateRange(t,i,{exactMatch:!1,suppressThrow:!1})}}}var Mw=new WeakMap,jw=new WeakMap;var Hw,zw={};var $w=function(){if(Hw)return zw;Hw=1,Object.defineProperty(zw,"__esModule",{value:!0});for(var e="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},n={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},r={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=1;o<20;o++)r["f"+o]=111+o;function i(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map(function(e){return a(e,t)}),o=function(e){return r.some(function(t){return s(t,e)})};return null==n?o:o(n)}function a(e,o){var i=o&&o.byKey,a={},s=(e=e.replace("++","+add")).split("+"),c=s.length;for(var d in t)a[t[d]]=!1;var f=!0,p=!1,h=void 0;try{for(var g,v=s[Symbol.iterator]();!(f=(g=v.next()).done);f=!0){var m=g.value,y=m.endsWith("?")&&m.length>1;y&&(m=m.slice(0,-1));var b=l(m),E=t[b];if(m.length>1&&!E&&!n[m]&&!r[b])throw new TypeError('Unknown modifier: "'+m+'"');1!==c&&E||(i?a.key=b:a.which=u(m)),E&&(a[E]=!y||null)}}catch(e){p=!0,h=e}finally{try{!f&&v.return&&v.return()}finally{if(p)throw h}}return a}function s(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function u(e){return e=l(e),r[e]||e.toUpperCase().charCodeAt(0)}function l(e){return e=e.toLowerCase(),e=n[e]||e}return zw.default=i,zw.isHotkey=i,zw.isCodeHotkey=function(e,t){return i(e,t)},zw.isKeyHotkey=function(e,t){return i(e,{byKey:!0},t)},zw.parseHotkey=a,zw.compareHotkey=s,zw.toKeyCode=u,zw.toKeyName=l,zw}(),Uw={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z",tab:"tab",selectAll:"mod+a"},Vw={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},Ww={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Gw=function(e){var t=Uw[e],n=Vw[e],r=Ww[e],o=t&&$w.isKeyHotkey(t),i=n&&$w.isKeyHotkey(n),a=r&&$w.isKeyHotkey(r);return function(e){return!(!o||!o(e))||(!!(Ay&&i&&i(e))||!(Ay||!a||!a(e)))}},qw={isBold:Gw("bold"),isCompose:Gw("compose"),isMoveBackward:Gw("moveBackward"),isMoveForward:Gw("moveForward"),isDeleteBackward:Gw("deleteBackward"),isDeleteForward:Gw("deleteForward"),isDeleteLineBackward:Gw("deleteLineBackward"),isDeleteLineForward:Gw("deleteLineForward"),isDeleteWordBackward:Gw("deleteWordBackward"),isDeleteWordForward:Gw("deleteWordForward"),isExtendBackward:Gw("extendBackward"),isExtendForward:Gw("extendForward"),isExtendLineBackward:Gw("extendLineBackward"),isExtendLineForward:Gw("extendLineForward"),isItalic:Gw("italic"),isMoveLineBackward:Gw("moveLineBackward"),isMoveLineForward:Gw("moveLineForward"),isMoveWordBackward:Gw("moveWordBackward"),isMoveWordForward:Gw("moveWordForward"),isRedo:Gw("redo"),isSplitBlock:Gw("splitBlock"),isTransposeCharacter:Gw("transposeCharacter"),isUndo:Gw("undo"),isTab:Gw("tab"),isSelectAll:Gw("selectAll")};function Kw(e){e.preventDefault()}var Yw={beforeinput:function(e,t,n){var r,o=e,i=n.getConfig().readOnly;if(Ty&&!i&&Ow(n,o.target)){null===(r=t.flushDOMSelectionChange)||void 0===r||r.call(t);var a=n.selection,s=o.inputType,u=o.dataTransfer||o.data||void 0;if("insertCompositionText"!==s&&"deleteCompositionText"!==s){if(o.preventDefault(),!s.startsWith("delete")||s.startsWith("deleteBy")){var l=Lg(o.getTargetRanges(),1)[0];if(l){var c=Iy.toSlateRange(n,l,{exactMatch:!1,suppressThrow:!1});a&&Bp.equals(a,c)||Wh.select(n,c)}}if(a&&Bp.isExpanded(a)){var d=Iy.getSelectedElems(n),f="table"===d[0].type,p="table-cell"!==d[d.length-1].type;if(f&&p)return;if(s.startsWith("delete")){var h=s.endsWith("Backward")?"backward":"forward";return void mh.deleteFragment(n,{direction:h})}}switch(s){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":mh.deleteFragment(n);break;case"deleteContent":case"deleteContentForward":mh.deleteForward(n);break;case"deleteContentBackward":mh.deleteBackward(n);break;case"deleteEntireSoftLine":mh.deleteBackward(n,{unit:"line"}),mh.deleteForward(n,{unit:"line"});break;case"deleteHardLineBackward":mh.deleteBackward(n,{unit:"block"});break;case"deleteSoftLineBackward":mh.deleteBackward(n,{unit:"line"});break;case"deleteHardLineForward":mh.deleteForward(n,{unit:"block"});break;case"deleteSoftLineForward":mh.deleteForward(n,{unit:"line"});break;case"deleteWordBackward":mh.deleteBackward(n,{unit:"word"});break;case"deleteWordForward":mh.deleteForward(n,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":mh.insertBreak(n);break;case"insertFromDrop":case"insertFromComposition":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromComposition"===s&&(t.isComposing=!1,Lv.set(n,!0)),"insertFromPaste"===s&&!_v.get(n))break;"[object DataTransfer]"===_m(u)?n.insertData(u):"string"==typeof u&&mh.insertText(n,u)}}}},blur:function(e,t,n){var r=e,o=t.isUpdatingSelection,i=t.latestElement;if(!n.getConfig().readOnly&&!o&&Ow(n,r.target)){var a=Iy.findDocumentOrShadowRoot(n);if(i!==a.activeElement){var s=r.relatedTarget;if(!(s===Iy.toDOMNode(n,n)||$m(s)&&s.hasAttribute("data-slate-spacer"))){if(null!=s&&Hm(s)&&Iy.hasDOMNode(n,s)){var u=Iy.toSlateNode(n,s);if(kp.isElement(u)&&!n.isVoid(u))return}if(Oy){var l=a.getSelection();null==l||l.removeAllRanges()}Iv.delete(n)}}}},focus:function(e,t,n){var r=Iy.toDOMNode(n,n),o=Iy.findDocumentOrShadowRoot(n);t.latestElement=o.activeElement,Sy&&e.target!==r?r.focus():Iv.set(n,!0)},click:function(e,t,n){if(!n.getConfig().readOnly&&xw(n,e.target)&&Hm(e.target)){var r=Iy.toSlateNode(n,e.target),o=Iy.findPath(n,r);if(mh.hasPath(n,o))if(_p.get(n,o)===r){var i=mh.start(n,o),a=mh.end(n,o),s=mh.void(n,{at:i}),u=mh.void(n,{at:a});if(s&&u&&Cp.equals(s[1],u[1])){var l=mh.range(n,i);Wh.select(n,l)}}}},compositionstart:function(e,t,n){if(Ow(n,e.target)){Mv.delete(n);var r=n.selection;if(r&&Bp.isExpanded(r)&&(mh.deleteFragment(n),Promise.resolve().then(function(){Lw(t,n,!0)})),n.selection){var o=Iy.toDOMRange(n,n.selection).startContainer,i=o.textContent||"";Mw.set(n,i),jw.set(n,o)}t.isComposing=!0,function(e,t){var n;t.getConfig().placeholder&&t.isEmpty()&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}(t,n)}},compositionend:function(e,t,n){var r=e;if(Ow(n,r.target)){t.isComposing=!1;var o=!0===Lv.get(n);o?(Lv.delete(n),Mv.delete(n)):Mv.delete(n);var i=n.selection;if(null!=i){(By||Sy)&&Iy.cleanExposedTexNodeInSelectionBlock(n);for(var a=Bp.isBackward(i)?i.focus:i.anchor,s=Lg(mh.node(n,[a.path[0]]),1)[0],u=0;u<a.path.length;u+=1){var l=Lg(mh.node(n,a.path.slice(0,u+1)),1)[0];if(kp.isElement(l)&&((Oy||Sy)&&"link"===l.type||"code"===l.type)){Iy.setNewKey(s);break}}var c=r.data;if(c&&!o){if(n.getConfig().maxLength){var d=Iy.getLeftLengthOfMaxLength(n);if(d<c.length){var f=Iy.toDOMRange(n,i);f.startContainer.nodeType===Node.TEXT_NODE&&(f.startContainer.textContent=Mw.get(n)||""),d>0&&mh.insertText(n,c.slice(0,d)),t.changeViewState()}else mh.insertText(n,c)}else{var p=Iy.findDocumentOrShadowRoot(n).getSelection();p&&function(e,t){if(Bp.isCollapsed(t)){var n=t.anchor,r=t.focus;if([2,3].includes(n.path.length)&&[2,3].includes(r.path.length)&&(0===n.offset||0===r.offset)){var o=mh.node(e,n.path),i=0===n.offset?n.path:r.path,a=[i[0],i[1]-1];if(0===i[1])return!1;var s=mh.node(e,a);if(Nh.isText(s[0])&&Nh.isText(o[0]))return!0}}}(n,i)&&(n.selection=Iy.toSlateRange(n,p,{exactMatch:!1,suppressThrow:!1})),mh.insertText(n,c)}Oy||setTimeout(function(){var e=n.selection;if(null!=e){var t=jw.get(n);if(null!=t)Iy.toDOMRange(n,e).startContainer!==t&&(t.textContent=Mw.get(n)||"")}})}}}},compositionupdate:function(e,t,n){Ow(n,e.target)&&(t.isComposing=!0)},keydown:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&!t.isComposing&&Ow(n,r.target)){if(function(e,t){var n=pv.get(e),r=n&&n.getMenus(),o=gv.get(e),i=o&&o.getMenus(),a=Ig(Ig({},r),i);for(var s in a){var u=a[s],l=u.hotkey;if(l&&$w.isHotkey(l,t)&&!u.isDisabled(e)){var c=u.getValue(e);u.exec(e,c)}}}(n,r),qw.isTab(r))return Kw(r),void n.handleTab();if(qw.isRedo(r))return Kw(r),void("function"==typeof n.redo&&n.redo());if(qw.isUndo(r))return Kw(r),void("function"==typeof n.undo&&n.undo());if(qw.isMoveLineBackward(r))return Kw(r),void Wh.move(n,{unit:"line",reverse:!0});if(qw.isMoveLineForward(r))return Kw(r),void Wh.move(n,{unit:"line"});if(qw.isExtendLineBackward(r))return Kw(r),void Wh.move(n,{unit:"line",edge:"focus",reverse:!0});if(qw.isExtendLineForward(r))return Kw(r),void Wh.move(n,{unit:"line",edge:"focus"});if(qw.isMoveBackward(r))return Kw(r),void(o&&Bp.isCollapsed(o)?Wh.move(n,{reverse:!0}):Wh.collapse(n,{edge:"start"}));if(qw.isMoveForward(r))return Kw(r),void(o&&Bp.isCollapsed(o)?Wh.move(n):Wh.collapse(n,{edge:"end"}));if(qw.isMoveWordBackward(r))return Kw(r),o&&Bp.isExpanded(o)&&Wh.collapse(n,{edge:"focus"}),void Wh.move(n,{unit:"word",reverse:!0});if(qw.isMoveWordForward(r))return Kw(r),o&&Bp.isExpanded(o)&&Wh.collapse(n,{edge:"focus"}),void Wh.move(n,{unit:"word"});if(qw.isSelectAll(r))return Kw(r),void n.selectAll();if(Ty){if((By||Oy)&&o&&(qw.isDeleteBackward(r)||qw.isDeleteForward(r))&&Bp.isCollapsed(o)){var i=_p.parent(n,o.anchor.path);if(kp.isElement(i)&&mh.isVoid(n,i)&&mh.isInline(n,i))return r.preventDefault(),void Wh.delete(n,{unit:"block"})}}else{if(qw.isBold(r)||qw.isItalic(r)||qw.isTransposeCharacter(r))return void Kw(r);if(qw.isSplitBlock(r))return Kw(r),void mh.insertBreak(n);if(qw.isDeleteBackward(r))return Kw(r),void(o&&Bp.isExpanded(o)?mh.deleteFragment(n,{direction:"backward"}):mh.deleteBackward(n));if(qw.isDeleteForward(r))return Kw(r),void(o&&Bp.isExpanded(o)?mh.deleteFragment(n,{direction:"forward"}):mh.deleteForward(n));if(qw.isDeleteLineBackward(r))return Kw(r),void(o&&Bp.isExpanded(o)?mh.deleteFragment(n,{direction:"backward"}):mh.deleteBackward(n,{unit:"line"}));if(qw.isDeleteLineForward(r))return Kw(r),void(o&&Bp.isExpanded(o)?mh.deleteFragment(n,{direction:"forward"}):mh.deleteForward(n,{unit:"line"}));if(qw.isDeleteWordBackward(r))return Kw(r),void(o&&Bp.isExpanded(o)?mh.deleteFragment(n,{direction:"backward"}):mh.deleteBackward(n,{unit:"word"}));if(qw.isDeleteWordForward(r))return Kw(r),void(o&&Bp.isExpanded(o)?mh.deleteFragment(n,{direction:"forward"}):mh.deleteForward(n,{unit:"word"}))}}},keypress:function(e,t,n){if(!Ty&&!n.getConfig().readOnly&&Ow(n,e.target)){e.preventDefault();var r=e.key;mh.insertText(n,r)}},copy:function(e,t,n){var r=e;if(Ow(n,r.target)){n.getConfig().readOnly||r.preventDefault();var o=r.clipboardData;if(null!=o){n.setFragmentData(o);var i=n.getConfig().customCopy;i&&i(n,r)}}},cut:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&(r.preventDefault(),Ow(n,r.target))){var i=r.clipboardData;if(null!=i&&(n.setFragmentData(i),o))if(Bp.isExpanded(o))mh.deleteFragment(n);else{var a=_p.parent(n,o.anchor.path);kp.isElement(a)&&mh.isVoid(n,a)&&Wh.delete(n)}}},paste:function(e,t,n){_v.set(n,!0);var r=e;if(!n.getConfig().readOnly&&Ow(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return _v.set(n,!1),void r.preventDefault();if(Oy||!Ty||function(e){return e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length}(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(e,t,n){if(xw(n,e.target)){var r=Iy.toSlateNode(n,e.target);kp.isElement(r)&&mh.isVoid(n,r)&&e.preventDefault()}},dragstart:function(e,t,n){var r=e;if(xw(n,r.target)&&!n.getConfig().readOnly){var o=Iy.toSlateNode(n,r.target),i=Iy.findPath(n,o);if(kp.isElement(o)&&mh.isVoid(n,o)||mh.void(n,{at:i,voids:!0})){var a=mh.range(n,i);Wh.select(n,a)}var s=r.dataTransfer;if(null!=s)Iy.getSelectedNodeByType(n,"table")||(t.isDraggingInternally=!0,n.setFragmentData(s))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&xw(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,n){var r=e,o=r.dataTransfer;if(!n.getConfig().readOnly&&xw(n,r.target)&&null!=o&&!(Ty&&Oy&&o.files.length>0)){r.preventDefault();var i=n.selection,a=Iy.findEventRange(n,r);Wh.select(n,a),t.isDraggingInternally&&(i&&Wh.delete(n,{at:i}),t.isDraggingInternally=!1),n.insertData(o),n.isFocused()||n.focus()}}};function Xw(e){if(Zw(e)){for(;e&&Zw(e);){e=Jw(e).parent}return null!=e?e:null}return e.parentNode}function Zw(e){return 11===e.nodeType}function Jw(e,t){var n,r,o;const i=e;return null!==(n=i.parent)&&void 0!==n||(i.parent=null!=t?t:null),null!==(r=i.firstChildNode)&&void 0!==r||(i.firstChildNode=e.firstChild),null!==(o=i.lastChildNode)&&void 0!==o||(i.lastChildNode=e.lastChild),i}const Qw={createElement:function(e,t){return document.createElement(e,t)},createElementNS:function(e,t,n){return document.createElementNS(e,t,n)},createTextNode:function(e){return document.createTextNode(e)},createDocumentFragment:function(){return Jw(document.createDocumentFragment())},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){if(Zw(e)){let t=e;for(;t&&Zw(t);){t=Jw(t).parent}e=null!=t?t:e}Zw(t)&&(t=Jw(t,e)),n&&Zw(n)&&(n=Jw(n).firstChildNode),e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){Zw(t)&&(t=Jw(t,e)),e.appendChild(t)},parentNode:Xw,nextSibling:function(e){var t;if(Zw(e)){const n=Jw(e),r=Xw(n);if(r&&n.lastChildNode){const e=Array.from(r.childNodes),o=e.indexOf(n.lastChildNode);return null!==(t=e[o+1])&&void 0!==t?t:null}return null}return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},getTextContent:function(e){return e.textContent},isElement:function(e){return 1===e.nodeType},isText:function(e){return 3===e.nodeType},isComment:function(e){return 8===e.nodeType},isDocumentFragment:Zw};function eC(e,t,n,r,o){return{sel:e,data:t,children:n,text:r,elm:o,key:void 0===t?void 0:t.key}}const tC=Array.isArray;function nC(e){return"string"==typeof e||"number"==typeof e||e instanceof String||e instanceof Number}const rC=eC("",{},[],void 0,void 0);function oC(e,t){var n,r;const o=e.key===t.key,i=(null===(n=e.data)||void 0===n?void 0:n.is)===(null===(r=t.data)||void 0===r?void 0:r.is),a=e.sel===t.sel,s=!(!e.sel&&e.sel===t.sel)||typeof e.text==typeof t.text;return a&&o&&i&&s}function iC(e,t,n){var r;const o={};for(let i=t;i<=n;++i){const t=null===(r=e[i])||void 0===r?void 0:r.key;void 0!==t&&(o[t]=i)}return o}const aC=["create","update","remove","destroy","pre","post"];function sC(e,t,n){const r={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},o=Qw;for(const t of aC)for(const n of e){const e=n[t];void 0!==e&&r[t].push(e)}function i(e){const t=e.id?"#"+e.id:"",n=e.getAttribute("class"),r=n?"."+n.split(" ").join("."):"";return eC(o.tagName(e).toLowerCase()+t+r,{},[],void 0,e)}function a(e){return eC(void 0,{},[],void 0,e)}function s(e,t){return function(){if(0===--t){const t=o.parentNode(e);null!==t&&o.removeChild(t,e)}}}function u(e,t){var n,i,a;let s;const l=e.data,c=null==l?void 0:l.hook;null===(n=null==c?void 0:c.init)||void 0===n||n.call(c,e);const d=e.children,f=e.sel;if("!"===f)null!==(i=e.text)&&void 0!==i||(e.text=""),e.elm=o.createComment(e.text);else if(""===f)e.elm=o.createTextNode(e.text);else if(void 0!==f){const n=f.indexOf("#"),i=f.indexOf(".",n),p=n>0?n:f.length,h=i>0?i:f.length,g=-1!==n||-1!==i?f.slice(0,Math.min(p,h)):f,v=null==l?void 0:l.ns,m=void 0===v?o.createElement(g,l):o.createElementNS(v,g,l);for(e.elm=m,p<h&&m.setAttribute("id",f.slice(p+1,h)),i>0&&m.setAttribute("class",f.slice(h+1).replace(/\./g," ")),s=0;s<r.create.length;++s)r.create[s](rC,e);if(!nC(e.text)||tC(d)&&0!==d.length||o.appendChild(m,o.createTextNode(e.text)),tC(d))for(s=0;s<d.length;++s){const e=d[s];null!=e&&o.appendChild(m,u(e,t))}void 0!==c&&(null===(a=c.create)||void 0===a||a.call(c,rC,e),void 0!==c.insert&&t.push(e))}else e.elm=o.createTextNode(e.text);return e.elm}function l(e,t,n,r,i,a){for(;r<=i;++r){const i=n[r];null!=i&&o.insertBefore(e,u(i,a),t)}}function c(e){var t,n;const o=e.data;if(void 0!==o){null===(n=null===(t=null==o?void 0:o.hook)||void 0===t?void 0:t.destroy)||void 0===n||n.call(t,e);for(let t=0;t<r.destroy.length;++t)r.destroy[t](e);if(void 0!==e.children)for(let t=0;t<e.children.length;++t){const n=e.children[t];null!=n&&"string"!=typeof n&&c(n)}}}function d(e,t,n,i){for(var a,u;n<=i;++n){let i;const l=t[n];if(null!=l)if(void 0!==l.sel){c(l),i=r.remove.length+1;const e=s(l.elm,i);for(let t=0;t<r.remove.length;++t)r.remove[t](l,e);const t=null===(u=null===(a=null==l?void 0:l.data)||void 0===a?void 0:a.hook)||void 0===u?void 0:u.remove;void 0!==t?t(l,e):e()}else l.children?(c(l),d(e,l.children,0,l.children.length-1)):o.removeChild(e,l.elm)}}function f(e,t,n){var i,a,s,c,p,h,g,v;const m=null===(i=t.data)||void 0===i?void 0:i.hook;null===(a=null==m?void 0:m.prepatch)||void 0===a||a.call(m,e,t);const y=t.elm=e.elm;if(e===t)return;if(void 0!==t.data||void 0!==t.text&&t.text!==e.text){null!==(s=t.data)&&void 0!==s||(t.data={}),null!==(c=e.data)&&void 0!==c||(e.data={});for(let n=0;n<r.update.length;++n)r.update[n](e,t);null===(g=null===(h=null===(p=t.data)||void 0===p?void 0:p.hook)||void 0===h?void 0:h.update)||void 0===g||g.call(h,e,t)}const b=e.children,E=t.children;void 0===t.text?void 0!==b&&void 0!==E?b!==E&&function(e,t,n,r){let i,a,s,c,p=0,h=0,g=t.length-1,v=t[0],m=t[g],y=n.length-1,b=n[0],E=n[y];for(;p<=g&&h<=y;)null==v?v=t[++p]:null==m?m=t[--g]:null==b?b=n[++h]:null==E?E=n[--y]:oC(v,b)?(f(v,b,r),v=t[++p],b=n[++h]):oC(m,E)?(f(m,E,r),m=t[--g],E=n[--y]):oC(v,E)?(f(v,E,r),o.insertBefore(e,v.elm,o.nextSibling(m.elm)),v=t[++p],E=n[--y]):oC(m,b)?(f(m,b,r),o.insertBefore(e,m.elm,v.elm),m=t[--g],b=n[++h]):(void 0===i&&(i=iC(t,p,g)),a=i[b.key],void 0===a?(o.insertBefore(e,u(b,r),v.elm),b=n[++h]):void 0===i[E.key]?(o.insertBefore(e,u(E,r),o.nextSibling(m.elm)),E=n[--y]):(s=t[a],s.sel!==b.sel?o.insertBefore(e,u(b,r),v.elm):(f(s,b,r),t[a]=void 0,o.insertBefore(e,s.elm,v.elm)),b=n[++h]));h<=y&&(c=null==n[y+1]?null:n[y+1].elm,l(e,c,n,h,y,r)),p<=g&&d(e,t,p,g)}(y,b,E,n):void 0!==E?(void 0!==e.text&&o.setTextContent(y,""),l(y,null,E,0,E.length-1,n)):void 0!==b?d(y,b,0,b.length-1):void 0!==e.text&&o.setTextContent(y,""):e.text!==t.text&&(void 0!==b&&d(y,b,0,b.length-1),o.setTextContent(y,t.text)),null===(v=null==m?void 0:m.postpatch)||void 0===v||v.call(m,e,t)}return function(e,t){let n,s,l;const c=[];for(n=0;n<r.pre.length;++n)r.pre[n]();for(!function(e,t){return e.isElement(t)}(o,e)?function(e,t){return e.isDocumentFragment(t)}(o,e)&&(e=a(e)):e=i(e),oC(e,t)?f(e,t,c):(s=e.elm,l=o.parentNode(s),u(t,c),null!==l&&(o.insertBefore(l,t.elm,o.nextSibling(s)),d(l,[e],0,0))),n=0;n<c.length;++n)c[n].data.hook.insert(c[n]);for(n=0;n<r.post.length;++n)r.post[n]();return t}}function uC(e,t,n){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==n&&void 0!==t)for(let e=0;e<t.length;++e){const n=t[e];if("string"==typeof n)continue;const r=n.data;void 0!==r&&uC(r,n.children,n.sel)}}function lC(e,t,n){let r,o,i,a={};if(void 0!==n?(null!==t&&(a=t),tC(n)?r=n:nC(n)?o=n.toString():n&&n.sel&&(r=[n])):null!=t&&(tC(t)?r=t:nC(t)?o=t.toString():t&&t.sel?r=[t]:a=t),void 0!==r)for(i=0;i<r.length;++i)nC(r[i])&&(r[i]=eC(void 0,void 0,void 0,r[i],void 0));return!e.startsWith("svg")||3!==e.length&&"."!==e[3]&&"#"!==e[3]||uC(a,r,e),eC(e,a,r,o,void 0)}function cC(e,t){let n;const r=t.elm;let o=e.data.attrs,i=t.data.attrs;if((o||i)&&o!==i){for(n in o=o||{},i=i||{},i){const e=i[n];o[n]!==e&&(!0===e?r.setAttribute(n,""):!1===e?r.removeAttribute(n):120!==n.charCodeAt(0)?r.setAttribute(n,e):58===n.charCodeAt(3)?r.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,e):58===n.charCodeAt(5)?109===n.charCodeAt(1)?r.setAttributeNS("http://www.w3.org/2000/xmlns/",n,e):r.setAttributeNS("http://www.w3.org/1999/xlink",n,e):r.setAttribute(n,e))}for(n in o)n in i||r.removeAttribute(n)}}const dC={create:cC,update:cC};function fC(e,t){let n,r;const o=t.elm;let i=e.data.class,a=t.data.class;if((i||a)&&i!==a){for(r in i=i||{},a=a||{},i)i[r]&&!Object.prototype.hasOwnProperty.call(a,r)&&o.classList.remove(r);for(r in a)n=a[r],n!==i[r]&&o.classList[n?"add":"remove"](r)}}const pC={create:fC,update:fC},hC=/[A-Z]/g;function gC(e,t){const n=t.elm;let r,o=e.data.dataset,i=t.data.dataset;if(!o&&!i)return;if(o===i)return;o=o||{},i=i||{};const a=n.dataset;for(r in o)r in i||(a?r in a&&delete a[r]:n.removeAttribute("data-"+r.replace(hC,"-$&").toLowerCase()));for(r in i)o[r]!==i[r]&&(a?a[r]=i[r]:n.setAttribute("data-"+r.replace(hC,"-$&").toLowerCase(),i[r]))}const vC={create:gC,update:gC};function mC(e,t,n){if("function"==typeof e)e.call(t,n,t);else if("object"==typeof e)for(let r=0;r<e.length;r++)mC(e[r],t,n)}function yC(e,t){const n=e.type,r=t.data.on;r&&r[n]&&mC(r[n],t,e)}function bC(e,t){const n=e.data.on,r=e.listener,o=e.elm,i=t&&t.data.on,a=t&&t.elm;let s;if(n!==i){if(n&&r)if(i)for(s in n)i[s]||o.removeEventListener(s,r,!1);else for(s in n)o.removeEventListener(s,r,!1);if(i){const r=t.listener=e.listener||function e(t){yC(t,e.vnode)};if(r.vnode=t,n)for(s in i)n[s]||a.addEventListener(s,r,!1);else for(s in i)a.addEventListener(s,r,!1)}}}const EC={create:bC,update:bC,destroy:bC};function wC(e,t){let n,r,o;const i=t.elm;let a=e.data.props,s=t.data.props;if((a||s)&&a!==s)for(n in a=a||{},s=s||{},s)r=s[n],o=a[n],o===r||"value"===n&&i[n]===r||(i[n]=r)}const CC={create:wC,update:wC},DC="function"==typeof(null===window||void 0===window?void 0:window.requestAnimationFrame)?window.requestAnimationFrame.bind(window):setTimeout;let AC=!1;function SC(e,t,n){var r;r=()=>{e[t]=n},DC(()=>{DC(r)})}function OC(e,t){let n,r;const o=t.elm;let i=e.data.style,a=t.data.style;if(!i&&!a)return;if(i===a)return;i=i||{},a=a||{};const s="delayed"in i;for(r in i)r in a||("-"===r[0]&&"-"===r[1]?o.style.removeProperty(r):o.style[r]="");for(r in a)if(n=a[r],"delayed"===r&&a.delayed)for(const e in a.delayed)n=a.delayed[e],s&&n===i.delayed[e]||SC(o.style,e,n);else"remove"!==r&&n!==i[r]&&("-"===r[0]&&"-"===r[1]?o.style.setProperty(r,n):o.style[r]=n)}const xC={pre:function(){AC=!1},create:OC,update:OC,destroy:function(e){let t,n;const r=e.elm,o=e.data.style;if(o&&(t=o.destroy))for(n in t)r.style[n]=t[n]},remove:function(e,t){const n=e.data.style;if(!n||!n.remove)return void t();let r;AC||(e.elm.offsetLeft,AC=!0);const o=e.elm;let i=0;const a=n.remove;let s=0;const u=[];for(r in a)u.push(r),o.style[r]=a[r];const l=getComputedStyle(o)["transition-property"].split(", ");for(;i<l.length;++i)-1!==u.indexOf(l[i])&&s++;o.addEventListener("transitionend",e=>{e.target===o&&--s,0===s&&t()})}};function NC(e,t){for(const n of e)null!=n&&!1!==n&&""!==n&&(Array.isArray(n)?NC(n,t):"string"==typeof n||"number"==typeof n||"boolean"==typeof n?t.push(eC(void 0,void 0,void 0,String(n),void 0)):t.push(n));return t}function BC(e,t,...n){const r=NC(n,[]);return"function"==typeof e?e(t,r):1===r.length&&!r[0].sel&&r[0].text?lC(e,t,r[0].text):lC(e,t,r)}var TC=[];var kC,FC,IC={};function PC(e,t,n){return BC(n.isInline(e)?"span":"div",null,t)}function RC(e,t){var n,r=Iy.findKey(t,e),o=t.isInline(e),i=mh.isVoid(t,e),a=py(e.type,r.id),s={id:a,key:r.id,"data-slate-node":"element","data-slate-inline":o},u=e.type,l=e.children,c=void 0===l?[]:l,d=function(e){return IC[e]||PC}(u);n=i?null:c.map(function(n,r){return jC(n,r,e,t)});var f=d(e,n,t);if(i){s["data-slate-void"]=!0;var p=o?"span":"div",h=Lg(_p.texts(e),1),g=Lg(h[0],1)[0],v=BC(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},jC(g,0,e,t));f=BC(p,{style:{position:"relative"}},f,v),Sv.set(g,0),Ov.set(g,e)}return null==f.data&&(f.data={}),Object.assign(f.data,s),i||o||(f=function(e,t){var n=t;return TC.forEach(function(r){n=r(e,t)}),n}(e,f)),Im(function(){var t=Wm(a);null!=t&&(Bv.set(r,t),Tv.set(e,t),Nv.set(t,e))}),f}function _C(e,t){return void 0===t&&(t=!1),BC("span",{"data-slate-string":!0},t?e+"\n":e)}function LC(e,t){return void 0===e&&(e=0),void 0===t&&(t=!1),BC("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\ufeff",t?BC("br",null):null)}function MC(e,t,n){if(null==e.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=Iy.findKey(n,e),o=n.getConfig().decorate;if(null==o)throw new Error("Can not get config.decorate");var i,a=Iy.findPath(n,e),s=o([e,a]),u=Nh.decorations(e,s),l=u.map(function(r){var o,i,a,s=r.leaf,l=r.position,c=function(e,t,n,r,o){void 0===t&&(t=!1);var i=e.text,a=Iy.findPath(o,n),s=Cp.parent(a);if(mh.isEditor(r))throw new Error("Text node ".concat(JSON.stringify(n)," parent is Editor"));return o.isVoid(r)?LC(_p.string(r).length):""!==i||r.children[r.children.length-1]!==n||o.isInline(r)||""!==mh.string(o,s)?""===i?LC():t&&"\n"===i.slice(-1)?_C(i,!0):_C(i):LC(0,!0)}(s,null!==(o=null==l?void 0:l.isLast)&&void 0!==o?o:1===u.length,e,t,n);return i=s,a=c,TC.forEach(function(e){a=e(i,a)}),BC("span",{"data-slate-leaf":!0},c=a)}),c=(i=r.id,"w-e-text-".concat(i)),d=BC("span",{"data-slate-node":"text",id:c,key:r.id},l);return Im(function(){var t=Wm(c);null!=t&&(Bv.set(r,t),Tv.set(e,t),Nv.set(t,e))}),d}function jC(e,t,n,r){return Sv.set(e,t),Ov.set(e,n),kp.isElement(e)?RC(e,r):MC(e,n,r)}var HC=function(){if(FC)return kC;FC=1;var e,t="[object Symbol]",n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o="\\ud800-\\udfff",i="\\u0300-\\u036f\\ufe20-\\ufe23",a="\\u20d0-\\u20f0",s="\\u2700-\\u27bf",u="a-z\\xdf-\\xf6\\xf8-\\xff",l="A-Z\\xc0-\\xd6\\xd8-\\xde",c="\\ufe0e\\ufe0f",d="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",f="['’]",p="["+o+"]",h="["+d+"]",g="["+i+a+"]",v="\\d+",m="["+s+"]",b="["+u+"]",E="[^"+o+d+v+s+u+l+"]",w="\\ud83c[\\udffb-\\udfff]",C="[^"+o+"]",D="(?:\\ud83c[\\udde6-\\uddff]){2}",A="[\\ud800-\\udbff][\\udc00-\\udfff]",S="["+l+"]",O="\\u200d",x="(?:"+b+"|"+E+")",N="(?:"+S+"|"+E+")",B="(?:['’](?:d|ll|m|re|s|t|ve))?",T="(?:['’](?:D|LL|M|RE|S|T|VE))?",k="(?:"+g+"|"+w+")"+"?",F="["+c+"]?",I=F+k+("(?:"+O+"(?:"+[C,D,A].join("|")+")"+F+k+")*"),P="(?:"+[m,D,A].join("|")+")"+I,R="(?:"+[C+g+"?",g,D,A,p].join("|")+")",_=RegExp(f,"g"),L=RegExp(g,"g"),M=RegExp(w+"(?="+w+")|"+R+I,"g"),j=RegExp([S+"?"+b+"+"+B+"(?="+[h,S,"$"].join("|")+")",N+"+"+T+"(?="+[h,S+x,"$"].join("|")+")",S+"?"+x+"+"+B,S+"+"+T,v,P].join("|"),"g"),H=RegExp("["+O+o+i+a+c+"]"),z=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$="object"==typeof y&&y&&y.Object===Object&&y,U="object"==typeof self&&self&&self.Object===Object&&self,V=$||U||Function("return this")(),W=(e={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},function(t){return null==e?void 0:e[t]});function G(e){return H.test(e)}function q(e){return G(e)?function(e){return e.match(M)||[]}(e):function(e){return e.split("")}(e)}var K=Object.prototype.toString,Y=V.Symbol,X=Y?Y.prototype:void 0,Z=X?X.toString:void 0;function J(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&K.call(e)==t}(e))return Z?Z.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}function Q(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,t,n)}function ee(e){return null==e?"":J(e)}var te,ne,re=(te=function(e,t,n){return t=t.toLowerCase(),e+(n?function(e){return oe(ee(e).toLowerCase())}(t):t)},function(e){return function(e,t,n){for(var r=-1,o=e?e.length:0;++r<o;)n=t(n,e[r],r,e);return n}(function(e,t){return e=ee(e),void 0===t?function(e){return z.test(e)}(e)?function(e){return e.match(j)||[]}(e):function(e){return e.match(n)||[]}(e):e.match(t)||[]}(function(e){return(e=ee(e))&&e.replace(r,W).replace(L,"")}(e).replace(_,"")),te,"")}),oe=(ne="toUpperCase",function(e){var t=G(e=ee(e))?q(e):void 0,n=t?t[0]:e.charAt(0),r=t?Q(t,1).join(""):e.slice(1);return n[ne]()+r});return kC=re}(),zC=b(HC);var $C=["props","attrs","style","dataset","on","hook"];function UC(e){var t=e.data,n=void 0===t?{}:t,r=e.children,o=void 0===r?[]:r;Object.keys(n).forEach(function(t){var r,o,i=n[t];if("key"!==t){if(!$C.includes(t)){if(t.startsWith("data-")){var a=t.slice(5);return a=zC(a),function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.dataset&&(n.dataset={});Object.assign(n.dataset,t)}(e,((r={})[a]=i,r)),void delete n[t]}!function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.props&&(n.props={});Object.assign(n.props,t)}(e,(o={},o[t]=i,o)),delete n[t]}}else e.key=i}),o.length>0&&o.forEach(function(e){"string"!=typeof e&&UC(e)})}function VC(e,t){var n,r,o=e.$scroll,i=(n=e.id,"w-e-textarea-".concat(n)),a=t.getConfig(),s=a.readOnly,u=a.autoFocus,l=function(e,t){return void 0===t&&(t=!1),lC("div#".concat(e),{props:{contentEditable:!t}})}(i,s),c=t.children||[];l.children=c.map(function(e,n){if(Dv.has(e)){var r=Dv.get(e);if(r){var o=Lg(r,2),i=o[0],a=o[1];if(a)return i!==n&&(Sv.set(e,n),Dv.set(e,[n,a])),a}}var s=jC(e,n,t,t);UC(s);var u=t.getConfig().skipCacheTypes,l=void 0===u?["list-item"]:u;return kp.isElement(e)&&l.includes(e.type)||Dv.set(e,[n,s]),s});var d=Ev.get(e);if(null==d&&(d=!0),d){var f=function(e){return Zv('<div\n id="'.concat(e,'"\n data-slate-editor\n data-slate-node="value"\n suppressContentEditableWarning\n role="textarea"\n spellCheck="true"\n autoCorrect="true"\n autoCapitalize="true"\n ></div>'))}(i);o.append(f),e.$textArea=f,r=f[0],(h=sC([pC,CC,xC,vC,EC,dC]))(r,l),Ev.set(e,!1),wv.set(e,h)}else{var p=Cv.get(e),h=wv.get(e);if(null==p||null==h)return;r=p.elm,h(p,l)}if(null!=r||null!=(r=Wm(i))){var g;if((d?u:t.isFocused())&&r.focus({preventScroll:!0}),d){var v=(g=r)&&g.ownerDocument&&g.ownerDocument.defaultView||null;v&&Fv.set(t,v)}xv.set(t,r),Tv.set(t,r),Nv.set(r,t),Cv.set(e,l)}}var WC=1,GC=function(){function e(e){var t=this;this.selectionChangeRoot=null,this.id=WC++,this.$textArea=null,this.$progressBar=Zv('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=Zv('<div class="w-e-max-length-info"></div>'),this.isComposing=!1,this.isUpdatingSelection=!1,this.isDraggingInternally=!1,this.latestElement=null,this.showPlaceholder=!1,this.$placeholder=null,this.latestEditorSelection=null,this.onDOMSelectionChange=Sw(function(e){var n=$m(null==e?void 0:e.target)?e.target:null,r=null==n?void 0:n.tagName;if("INPUT"!==r&&"TEXTAREA"!==r){var o=t.editorInstance;!function(e,t){var n=e.isComposing,r=e.isUpdatingSelection,o=e.isDraggingInternally,i=t.getConfig();if(!r&&!o){var a=Iy.findDocumentOrShadowRoot(t),s=a.activeElement,u=Iy.toDOMNode(t,t),l=a.getSelection();if(s!==u)return Iv.delete(t),void _w(t);if(e.latestElement=s,Iv.set(t,!0),!l)return _w(t);var c=l.anchorNode,d=l.focusNode,f=Nw(t,c),p=xw(t,d);if(!n)if(f&&p){var h=Iy.toSlateRange(t,l,{exactMatch:!1,suppressThrow:!0});h&&Wh.select(t,h)}else i.readOnly&&_w(t)}}(t,o)}},100);var n=Zv(e);if(0===n.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=n;var r=Zv('<div class="w-e-text-container"></div>');r.append(this.$progressBar),r.append(this.$maxLengthInfo),n.append(r);var o=Zv('<div class="w-e-scroll"></div>');r.append(o),this.$scroll=o,this.$textAreaContainer=r,Im(function(){var e=t.editorInstance;t.bindSelectionChange(e),r.on("click",function(){return e.hidePanelOrModal()}),e.on(nv,t.changeViewState.bind(t));var o=e.getConfig(),i=o.onChange,a=o.scroll;i&&e.on(nv,function(){return i(e)}),a||(n.css("position","relative"),r.addClass("no-scroll")),t.onFocusAndOnBlur(),e.on(nv,t.changeMaxLengthInfo.bind(t)),t.bindEvent()})}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var e=dv.get(this);if(null==e)throw new Error("Can not get editor instance");return e},enumerable:!1,configurable:!0}),e.prototype.bindSelectionChange=function(e,t){var n=this;if(void 0===t&&(t=5),null==this.selectionChangeRoot&&!e.isDestroyed){try{var r=Iy.findDocumentOrShadowRoot(e);r.addEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=r}catch(r){if(t>0)return void setTimeout(function(){return n.bindSelectionChange(e,t-1)},0);window.document.addEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=window.document}e.on(tv,function(){var e;null===(e=n.selectionChangeRoot)||void 0===e||e.removeEventListener("selectionchange",n.onDOMSelectionChange),n.selectionChangeRoot=null})}},e.prototype.flushDOMSelectionChange=function(){this.onDOMSelectionChange.flush()},e.prototype.bindEvent=function(){var e=this,t=this.$textArea,n=this.$scroll,r=this.editorInstance;null!=t&&(qg(Yw,function(n,o){t.on(o,function(t){n(t,e,r)})}),r.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",Sw(function(){r.emit(rv)},100))))},e.prototype.onFocusAndOnBlur=function(){var e=this,t=this.editorInstance,n=t.getConfig(),r=n.onBlur,o=n.onFocus;this.latestEditorSelection=t.selection,t.on(nv,function(){null==e.latestEditorSelection&&null!=t.selection?setTimeout(function(){return o&&o(t)}):null!=e.latestEditorSelection&&null==t.selection&&setTimeout(function(){return r&&r(t)}),e.latestEditorSelection=t.selection})},e.prototype.changeMaxLengthInfo=function(){var e=this.editorInstance,t=e.getConfig().maxLength;if(t){var n=t-Iy.getLeftLengthOfMaxLength(e);this.$maxLengthInfo[0].innerHTML="".concat(n,"/").concat(t)}},e.prototype.changeProgress=function(e){var t=this.$progressBar;t.css("width","".concat(e,"%")),e>=100&&setTimeout(function(){t.hide(),t.css("width","0"),t.show()},1e3)},e.prototype.changeViewState=function(){var e=this,t=this.editorInstance;VC(this,t),function(e,t){var n,r=t.getConfig().placeholder;if(r){var o=t.isEmpty();if(o&&!e.showPlaceholder&&!e.isComposing){if(null==e.$placeholder){var i=Zv('<div class="w-e-text-placeholder">'.concat(r,"</div>"));e.$textAreaContainer.append(i),e.$placeholder=i}return e.$placeholder.show(),void(e.showPlaceholder=!0)}!o&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}}(this,t),Im(function(){Lw(e,t)})},e.prototype.destroy=function(){this.$textAreaContainer.remove()},e}();function qC(e,t,n,r){if(Sv.set(e,t),Ov.set(e,n),kp.isElement(e)){var o=e.children;if((void 0===o?[]:o).forEach(function(t,n){return qC(t,n,e,r)}),mh.isVoid(r,e)){var i=Lg(_p.texts(e),1),a=Lg(i[0],1)[0];Sv.set(a,0),Ov.set(a,e)}}}function KC(e){var t=e.selector,n=void 0===t?"":t,r=e.config,o=void 0===r?{}:r,i=e.content,a=e.html,s=e.plugins,u=void 0===s?[]:s,l=function(e){return[Wb,xb,jv,Sb,tE,Vb,Kb,Ng].reduce(function(e,t){return t(e)},e)}(Cg());if(n&&function(e,t){return dy(e,"data-w-e-textarea",t)}(l,n))throw new Error("Repeated create editor by selector '".concat(n,"'"));var c=function(e){void 0===e&&(e={});var t=Wg(Qg),n={},r=e.MENU_CONF,o=void 0===r?{}:r;return qg(t,function(e,t){n[t]=Ig(Ig({},e),o[t]||{})}),delete e.MENU_CONF,Ig({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:n,hoverbarKeys:{},sanitizeHtml:Jg,customAlert:function(e,t){window.alert("".concat(t,":\n").concat(e))}},e)}(o);bv.set(l,c);var d=c.hoverbarKeys,f=void 0===d?{}:d;if(u.forEach(function(e){l=e(l)}),function(e,t){var n=t.html,r=t.content;null!=n?e.children=fy(e,n):r&&r.length&&(e.children=r),0===e.children.length&&(e.children=[{type:"paragraph",children:[{text:""}]}])}(l,{html:a,content:i}),n){var p=new GC(n);cv.set(l,p),dv.set(p,l),p.changeViewState();var h=void 0;Object.keys(f).length>0&&(h=new Dw,hv.set(h,l),gv.set(l,h)),l.on(nv,function(){l.hidePanelOrModal()}),l.on(rv,function(){l.hidePanelOrModal()})}else l.children.forEach(function(e,t){return qC(e,t,l,l)});var g=c.onCreated,v=c.onDestroyed;return g&&l.on(ev,function(){return g(l)}),v&&l.on(tv,function(){return v(l)}),Im(function(){return l.emit(ev)}),l}var YC=function(){function e(e,t){var n=this;this.$toolbar=Zv('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=rE(function(){n.toolbarItems.forEach(function(e){e.changeMenuState()})},200),this.config=t;var r=Zv(e);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '".concat(e,"'"));this.$box=r;var o=this.$toolbar;o.on("mousedown",function(e){return e.preventDefault()},{passive:!1}),r.append(o),Im(function(){n.initToolbar(),n.lngListen=JE(function(){return n.initToolbar()}),n.getEditorInstance().on(nv,n.changeToolbarState)})}return e.prototype.getMenus=function(){return this.menus},e.prototype.getConfig=function(){return this.config},e.prototype.initToolbar=function(){this.menus={};var e=this.$toolbar;null==e||e.empty(),this.registerItems(),this.changeToolbarState()},e.prototype.registerItems=function(){var e=this,t="",n=this.$toolbar,r=this.config,o=r.toolbarKeys,i=void 0===o?[]:o,a=r.insertKeys,s=void 0===a?{index:0,keys:[]}:a,u=r.excludeKeys,l=void 0===u?[]:u,c=Wg(i),d=[];d=Array.isArray(s)?s:[s];var f=0;d.forEach(function(e){var t=e.index+f;if(e.replaceFn&&c[t]){var n=e.replaceFn(c[t]);if(!n)throw new Error("This function needs to return the menu configuration:string | IMenuGroup");c[t]=n}e.keys.length>0&&("string"==typeof e.keys&&(e.keys=[e.keys]),e.keys.forEach(function(e,n){c.splice(t+n,0,e)}),f+=e.keys.length)});var p=c.filter(function(e){var t="string"==typeof e?e:e.key;return!l.includes(t)}),h=p.length;p.forEach(function(r,o){if("|"===r){if(0===o)return;if(o+1===h)return;if("|"===t)return;var i=nw();return n.append(i),void(t=r)}if("string"==typeof r)return e.registerSingleItem(r,e),void(t=r);e.registerGroup(r),t="group"})},e.prototype.registerGroup=function(e){var t=this,n=this.$toolbar,r=function(e){return new vw(e)}(e),o=e.menuKeys,i=void 0===o?[]:o,a=this.config.excludeKeys,s=void 0===a?[]:a;i.forEach(function(e){s.includes(e)||t.registerSingleItem(e,r)}),n.append(r.$elem)},e.prototype.registerSingleItem=function(e,t){var n=this.getEditorInstance(),r=t instanceof vw,o=this.menus,i=o[e];if(null==i){var a=uv[e];if(null==a)throw new Error("Not found menu item factory by key '".concat(e,"'"));if("function"!=typeof a)throw new Error("Menu item factory (key='".concat(e,"') is not a function"));i=a(),o[e]=i}else console.warn("Duplicated toolbar menu key '".concat(e,"'\n重复注册了菜单栏 menu '").concat(e,"'"));var s=n.getMenuConfig(e);s&&void 0!==s.iconSvg&&(i.iconSvg=s.iconSvg);var u=bw(e,i,r);(this.toolbarItems.push(u),vv.set(u,n),r)?t.appendBarItem(u):t.$toolbar.append(u.$elem)},e.prototype.getEditorInstance=function(){var e=fv.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.destroy=function(){var e;this.$toolbar.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.toolbarItems=[]},e}();function XC(e,t){if(null==e)throw new Error("Cannot create toolbar, because editor is null");var n=t.selector,r=t.config,o=void 0===r?{}:r;if(function(e,t){return dy(e,"data-w-e-toolbar",t)}(e,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=Ig({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new YC(n,i);return fv.set(a,e),pv.set(e,a),a}var ZC,JC,QC,eD,tD,nD={exports:{}},rD={};function oD(){if(QC)return rD;QC=1,Object.defineProperty(rD,"__esModule",{value:!0}),rD.justErrorsLogger=rD.debugLogger=void 0;const e=function(){if(JC)return ZC;function e(e){return e<10?`0${e}`:e.toString()}return JC=1,ZC=function(){const t=new Date;return`${e(t.getHours())}:${e(t.getMinutes())}:${e(t.getSeconds())}`}}(),t={debug:()=>{},warn:()=>{},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.error(`[Uppy] [${e()}]`,...n)}};rD.justErrorsLogger=t;const n={debug:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.debug(`[Uppy] [${e()}]`,...n)},warn:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.warn(`[Uppy] [${e()}]`,...n)},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.error(`[Uppy] [${e()}]`,...n)}};return rD.debugLogger=n,rD}function iD(){if(tD)return eD;tD=1;return eD={nanoid:(e=21)=>{let t="",n=0|e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",o=0|n;for(;o--;)r+=e[Math.random()*e.length|0];return r}},eD}var aD,sD,uD,lD,cD,dD,fD,pD,hD,gD,vD,mD,yD,bD,ED,wD,CD,DD,AD,SD,OD,xD,ND,BD,TD,kD,FD,ID,PD,RD,_D,LD={};function MD(){return sD?aD:(sD=1,aD=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1);e=Number(e/Math.pow(1024,r));var o=n[r];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+o:(t?"-":"")+e.toFixed(1)+" "+o})}function jD(){if(lD)return uD;function e(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}return lD=1,e.prototype.match=function(e){var t,n,r=!0,o=this.parts,i=o.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||"").split(this.separator),t=0;r&&t<i;t++)"*"!==o[t]&&(r=t<n.length&&o[t]===n[t]);r=r&&n}else r=!1;else if("function"==typeof e.splice)for(r=[],t=e.length;t--;)this.match(e[t])&&(r[r.length]=e[t]);else if("object"==typeof e)for(var a in r={},e)this.match(a)&&(r[a]=e[a]);return r},uD=function(t,n,r){var o=new e(t,r||/[\/\.]/);return void 0!==n?o.match(n):o},uD}function HD(){if(fD)return LD;fD=1,Object.defineProperty(LD,"__esModule",{value:!0}),LD.defaultOptions=LD.RestrictionError=LD.Restricter=void 0;const e=MD(),t=function(){if(dD)return cD;dD=1;var e=jD(),t=/[\/\+\.]/;return cD=function(n,r){function o(r){var o=e(r,n,t);return o&&o.length>=2}return r?o(r.split(";")[0]):o}}();LD.defaultOptions={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class n extends Error{constructor(){super(...arguments),this.isRestriction=!0}}LD.RestrictionError=n,"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}});return LD.Restricter=class{constructor(e,t){this.i18n=t,this.getOpts=()=>{const t=e();if(null!=t.restrictions.allowedFileTypes&&!Array.isArray(t.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return t}}validate(r,o){const{maxFileSize:i,minFileSize:a,maxTotalFileSize:s,maxNumberOfFiles:u,allowedFileTypes:l}=this.getOpts().restrictions;if(u){const e=o.filter(e=>!e.isGhost);if(e.length+1>u)throw new n(`${this.i18n("youCanOnlyUploadX",{smart_count:u})}`)}if(l){if(!l.some(e=>e.includes("/")?!!r.type&&t(r.type.replace(/;.*?$/,""),e):!("."!==e[0]||!r.extension)&&r.extension.toLowerCase()===e.slice(1).toLowerCase())){const e=l.join(", ");throw new n(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}}if(s&&null!=r.size){const t=o.reduce((e,t)=>e+t.size,r.size);if(t>s)throw new n(this.i18n("exceedsSize",{size:e(s),file:r.name}))}if(i&&null!=r.size&&r.size>i)throw new n(this.i18n("exceedsSize",{size:e(i),file:r.name}));if(a&&null!=r.size&&r.size<a)throw new n(this.i18n("inferiorSize",{size:e(a)}))}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(Object.keys(e).length<t)throw new n(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new n(this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:r}=this.getOpts().restrictions,o=Object.prototype.hasOwnProperty,i=[];for(const t of r)o.call(e.meta,t)&&""!==e.meta[t]||i.push(t);return{missingFields:i,error:t}}},LD}function zD(){if(hD)return pD;return hD=1,pD=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}function $D(){if(vD)return gD;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}vD=1;var t=0;function n(e){return"__private_"+t+++"_"+e}const r=zD();function o(e,t,n){const r=[];return e.forEach(e=>"string"!=typeof e?r.push(e):t[Symbol.split](e).forEach((e,t,o)=>{""!==e&&r.push(e),t<o.length-1&&r.push(n)})),r}
|
|
1
|
+
var e,t,n,r,o,i,a,s,u,l,c,d,f,p,h,g,v,m,y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function b(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function E(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){var n=!1;try{n=this instanceof e}catch{}return n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}function w(){return t?e:(t=1,e=function(e){try{return!!e()}catch(e){return!0}})}function C(){if(r)return n;r=1;var e=w();return n=!e(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})}function D(){if(i)return o;i=1;var e=C(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return o=e?r:function(e){return function(){return n.apply(e,arguments)}},o}function A(){if(s)return a;s=1;var e=D(),t=e({}.toString),n=e("".slice);return a=function(e){return n(t(e),8,-1)}}function S(){if(l)return u;l=1;var e=D(),t=w(),n=A(),r=Object,o=e("".split);return u=t(function(){return!r("z").propertyIsEnumerable(0)})?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function O(){return d?c:(d=1,c=function(e){return null==e})}function x(){if(p)return f;p=1;var e=O(),t=TypeError;return f=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function N(){if(g)return h;g=1;var e=S(),t=x();return h=function(n){return e(t(n))}}function B(){if(m)return v;m=1;var e=function(e){return e&&e.Math===Math&&e};return v=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof y&&y)||e("object"==typeof v&&v)||function(){return this}()||Function("return this")()}var T,k,F,I,P,R,_,L,M,j,H,z,$,U,V,W,G,q,K,Y,X,Z,J,Q,ee,te,ne,re,oe,ie={exports:{}};function ae(){return k?T:(k=1,T=!1)}function se(){if(I)return F;I=1;var e=B(),t=Object.defineProperty;return F=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function ue(){if(P)return ie.exports;P=1;var e=ae(),t=B(),n=se(),r="__core-js_shared__",o=ie.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.49.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),ie.exports}function le(){if(_)return R;_=1;var e=ue();return R=function(t,n){return e[t]||(e[t]=n||{})}}function ce(){if(M)return L;M=1;var e=x(),t=Object;return L=function(n){return t(e(n))}}function de(){if(H)return j;H=1;var e=D(),t=ce(),n=e({}.hasOwnProperty);return j=Object.hasOwn||function(e,r){return n(t(e),r)}}function fe(){if($)return z;$=1;var e=D(),t=0,n=Math.random(),r=e(1.1.toString);return z=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function pe(){if(G)return W;G=1;var e,t,n=B(),r=function(){if(V)return U;V=1;var e=B().navigator,t=e&&e.userAgent;return U=t?String(t):""}(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(t=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&r&&(!(e=r.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1]),W=t}function he(){if(K)return q;K=1;var e=pe(),t=w(),n=B().String;return q=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),q}function ge(){if(X)return Y;X=1;var e=he();return Y=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function ve(){if(J)return Z;J=1;var e=B(),t=le(),n=de(),r=fe(),o=he(),i=ge(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return Z=function(e){return n(s,e)||(s[e]=o&&n(a,e)?a[e]:u("Symbol."+e)),s[e]}}function me(){if(ee)return Q;ee=1;var e="object"==typeof document&&document.all;return Q=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function ye(){if(ne)return te;ne=1;var e=me();return te=function(t){return"object"==typeof t?null!==t:e(t)}}function be(){if(oe)return re;oe=1;var e=ye(),t=String,n=TypeError;return re=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}var Ee,we,Ce,De,Ae={};function Se(){if(we)return Ee;we=1;var e=w();return Ee=!e(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})}function Oe(){if(De)return Ce;De=1;var e=Se(),t=w();return Ce=e&&t(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})}var xe,Ne,Be,Te,ke,Fe,Ie,Pe,Re,_e,Le,Me,je,He,ze,$e,Ue,Ve,We,Ge,qe,Ke,Ye,Xe,Ze,Je,Qe,et,tt,nt,rt,ot,it,at,st,ut,lt,ct,dt,ft,pt,ht,gt,vt,mt,yt,bt,Et,wt,Ct,Dt,At,St,Ot,xt,Nt,Bt,Tt,kt,Ft,It,Pt,Rt,_t,Lt={};function Mt(){if(Ne)return xe;Ne=1;var e=B(),t=ye(),n=e.document,r=t(n)&&t(n.createElement);return xe=function(e){return r?n.createElement(e):{}}}function jt(){if(Te)return Be;Te=1;var e=Se(),t=w(),n=Mt();return Be=!e&&!t(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function Ht(){if(Fe)return ke;Fe=1;var e=C(),t=Function.prototype.call;return ke=e?t.bind(t):function(){return t.apply(t,arguments)},ke}function zt(){if(Pe)return Ie;Pe=1;var e=B(),t=me();return Ie=function(n,r){return arguments.length<2?(o=e[n],t(o)?o:void 0):e[n]&&e[n][r];var o},Ie}function $t(){if(_e)return Re;_e=1;var e=D();return Re=e({}.isPrototypeOf)}function Ut(){if(Me)return Le;Me=1;var e=zt(),t=me(),n=$t(),r=ge(),o=Object;return Le=r?function(e){return"symbol"==typeof e}:function(r){var i=e("Symbol");return t(i)&&n(i.prototype,o(r))}}function Vt(){if(He)return je;He=1;var e=String;return je=function(t){try{return e(t)}catch(e){return"Object"}}}function Wt(){if($e)return ze;$e=1;var e=me(),t=Vt(),n=TypeError;return ze=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function Gt(){if(Ve)return Ue;Ve=1;var e=Wt(),t=O();return Ue=function(n,r){var o=n[r];return t(o)?void 0:e(o)},Ue}function qt(){if(Ke)return qe;Ke=1;var e=Ht(),t=ye(),n=Ut(),r=Gt(),o=function(){if(Ge)return We;Ge=1;var e=Ht(),t=me(),n=ye(),r=TypeError;return We=function(o,i){var a,s;if("string"===i&&t(a=o.toString)&&!n(s=e(a,o)))return s;if(t(a=o.valueOf)&&!n(s=e(a,o)))return s;if("string"!==i&&t(a=o.toString)&&!n(s=e(a,o)))return s;throw new r("Can't convert object to primitive value")},We}(),i=ve(),a=TypeError,s=i("toPrimitive");return qe=function(i,u){if(!t(i)||n(i))return i;var l,c=r(i,s);if(c){if(void 0===u&&(u="default"),l=e(c,i,u),!t(l)||n(l))return l;throw new a("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(i,u)}}function Kt(){if(Xe)return Ye;Xe=1;var e=qt(),t=Ut();return Ye=function(n){var r=e(n,"string");return t(r)?r:r+""}}function Yt(){if(Ze)return Lt;Ze=1;var e=Se(),t=jt(),n=Oe(),r=be(),o=Kt(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Lt.f=e?n?function(e,t,n){if(r(e),t=o(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var i=s(e,t);i&&i[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(e,t,n)}:a:function(e,n,s){if(r(e),n=o(n),r(s),t)try{return a(e,n,s)}catch(e){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(e[n]=s.value),e},Lt}function Xt(){if(tt)return et;tt=1;var e=function(){if(Qe)return Je;Qe=1;var e=Math.ceil,t=Math.floor;return Je=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Je}();return et=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function Zt(){if(it)return ot;it=1;var e=Xt(),t=Math.min;return ot=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function Jt(){if(st)return at;st=1;var e=Zt();return at=function(t){return e(t.length)}}function Qt(){if(lt)return ut;lt=1;var e=N(),t=function(){if(rt)return nt;rt=1;var e=Xt(),t=Math.max,n=Math.min;return nt=function(r,o){var i=e(r);return i<0?t(i+o,0):n(i,o)},nt}(),n=Jt(),r=function(r){return function(o,i,a){var s=e(o),u=n(s);if(0===u)return!r&&-1;var l,c=t(a,u);if(r&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((r||c in s)&&s[c]===i)return r||c||0;return!r&&-1}};return ut={includes:r(!0),indexOf:r(!1)}}function en(){return dt?ct:(dt=1,ct={})}function tn(){if(pt)return ft;pt=1;var e=D(),t=de(),n=N(),r=Qt().indexOf,o=en(),i=e([].push);return ft=function(e,a){var s,u=n(e),l=0,c=[];for(s in u)!t(o,s)&&t(u,s)&&i(c,s);for(;a.length>l;)t(u,s=a[l++])&&(~r(c,s)||i(c,s));return c},ft}function nn(){return gt?ht:(gt=1,ht=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function rn(){if(yt)return Ae;yt=1;var e=Se(),t=Oe(),n=Yt(),r=be(),o=N(),i=function(){if(mt)return vt;mt=1;var e=tn(),t=nn();return vt=Object.keys||function(n){return e(n,t)},vt}();return Ae.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)n.f(e,a=u[c++],s[a]);return e},Ae}function on(){if(Ct)return wt;Ct=1;var e=le(),t=fe(),n=e("keys");return wt=function(e){return n[e]||(n[e]=t(e))}}function an(){if(At)return Dt;At=1;var e,t=be(),n=rn(),r=nn(),o=en(),i=function(){if(Et)return bt;Et=1;var e=zt();return bt=e("document","documentElement")}(),a=Mt(),s=on(),u="prototype",l="script",c=s("IE_PROTO"),d=function(){},f=function(e){return"<"+l+">"+e+"</"+l+">"},p=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;h="undefined"!=typeof document?document.domain&&e?p(e):(n=a("iframe"),o="java"+l+":",n.style.display="none",i.appendChild(n),n.src=String(o),(t=n.contentWindow.document).open(),t.write(f("document.F=Object")),t.close(),t.F):p(e);for(var s=r.length;s--;)delete h[u][r[s]];return h()};return o[c]=!0,Dt=Object.create||function(e,r){var o;return null!==e?(d[u]=t(e),o=new d,d[u]=null,o[c]=e):o=h(),void 0===r?o:n.f(o,r)},Dt}function sn(){return Nt?xt:(Nt=1,xt={})}function un(){return Ft?kt:(Ft=1,kt=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function ln(){if(Pt)return It;Pt=1;var e=Se(),t=Yt(),n=un();return It=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}function cn(){if(_t)return Rt;_t=1;var e,t,n,r=function(){if(Tt)return Bt;Tt=1;var e=B(),t=me(),n=e.WeakMap;return Bt=t(n)&&/native code/.test(String(n))}(),o=B(),i=ye(),a=ln(),s=de(),u=ue(),l=on(),c=en(),d="Object already initialized",f=o.TypeError,p=o.WeakMap;if(r||u.state){var h=u.state||(u.state=new p);h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new f(d);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var g=l("state");c[g]=!0,e=function(e,t){if(s(e,g))throw new f(d);return t.facade=e,a(e,g,t),t},t=function(e){return s(e,g)?e[g]:{}},n=function(e){return s(e,g)}}return Rt={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!i(n)||(r=t(n)).type!==e)throw new f("Incompatible receiver, "+e+" required");return r}}}}var dn,fn,pn={},hn={};function gn(){if(fn)return pn;fn=1;var e=Se(),t=Ht(),n=function(){if(dn)return hn;dn=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return hn.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,hn}(),r=un(),o=N(),i=Kt(),a=de(),s=jt(),u=Object.getOwnPropertyDescriptor;return pn.f=e?u:function(e,l){if(e=o(e),l=i(l),s)try{return u(e,l)}catch(e){}if(a(e,l))return r(!t(n.f,e,l),e[l])},pn}var vn,mn,yn,bn,En,wn,Cn,Dn={exports:{}};function An(){if(mn)return vn;mn=1;var e=Se(),t=de(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,o=t(n,"name"),i=o&&"something"===function(){}.name,a=o&&(!e||e&&r(n,"name").configurable);return vn={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function Sn(){if(bn)return yn;bn=1;var e=D(),t=me(),n=ue(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),yn=n.inspectSource}function On(){if(En)return Dn.exports;En=1;var e=D(),t=w(),n=me(),r=de(),o=Se(),i=An().CONFIGURABLE,a=Sn(),s=cn(),u=s.enforce,l=s.get,c=String,d=Object.defineProperty,f=e("".slice),p=e("".replace),h=e([].join),g=o&&!t(function(){return 8!==d(function(){},"length",{value:8}).length}),v=String(String).split("String"),m=Dn.exports=function(e,t,n){"Symbol("===f(c(t),0,7)&&(t="["+p(c(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!r(e,"name")||i&&e.name!==t)&&(o?d(e,"name",{value:t,configurable:!0}):e.name=t),g&&n&&r(n,"arity")&&e.length!==n.arity&&d(e,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?o&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var a=u(e);return r(a,"source")||(a.source=h(v,"string"==typeof t?t:"")),e};return Function.prototype.toString=m(function(){return n(this)&&l(this).source||a(this)},"toString"),Dn.exports}function xn(){if(Cn)return wn;Cn=1;var e=me(),t=Yt(),n=On(),r=se();return wn=function(o,i,a,s){s||(s={});var u=s.enumerable,l=void 0!==s.name?s.name:i;if(e(a)&&n(a,l,s),s.global)u?o[i]=a:r(i,a);else{try{s.unsafe?o[i]&&(u=!0):delete o[i]}catch(e){}u?o[i]=a:t.f(o,i,{value:a,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return o},wn}var Nn,Bn={};var Tn,kn,Fn,In,Pn,Rn,_n,Ln,Mn,jn,Hn,zn,$n,Un,Vn,Wn,Gn,qn,Kn,Yn,Xn,Zn,Jn,Qn,er,tr,nr,rr,or,ir,ar,sr,ur,lr={};function cr(){if(Fn)return kn;Fn=1;var e=zt(),t=D(),n=function(){if(Nn)return Bn;Nn=1;var e=tn(),t=nn().concat("length","prototype");return Bn.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Bn}(),r=(Tn||(Tn=1,lr.f=Object.getOwnPropertySymbols),lr),o=be(),i=t([].concat);return kn=e("Reflect","ownKeys")||function(e){var t=n.f(o(e)),a=r.f;return a?i(t,a(e)):t},kn}function dr(){if(Pn)return In;Pn=1;var e=de(),t=cr(),n=gn(),r=Yt();return In=function(o,i,a){for(var s=t(i),u=r.f,l=n.f,c=0;c<s.length;c++){var d=s[c];e(o,d)||a&&e(a,d)||u(o,d,l(i,d))}},In}function fr(){if(Mn)return Ln;Mn=1;var e=B(),t=gn().f,n=ln(),r=xn(),o=se(),i=dr(),a=function(){if(_n)return Rn;_n=1;var e=w(),t=me(),n=/#|\.prototype\./,r=function(n,r){var u=i[o(n)];return u===s||u!==a&&(t(r)?e(r):!!r)},o=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return Rn=r}();return Ln=function(s,u){var l,c,d,f,p,h=s.target,g=s.global,v=s.stat;if(l=g?e:v?e[h]||o(h,{}):e[h]&&e[h].prototype)for(c in u){if(f=u[c],d=s.dontCallGetSet?(p=t(l,c))&&p.value:l[c],!a(g?c:h+(v?".":"#")+c,s.forced)&&void 0!==d){if(typeof f==typeof d)continue;i(f,d)}(s.sham||d&&d.sham)&&n(f,"sham",!0),r(l,c,f,s)}}}function pr(){if($n)return zn;$n=1;var e=de(),t=me(),n=ce(),r=on(),o=function(){if(Hn)return jn;Hn=1;var e=w();return jn=!e(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),jn}(),i=r("IE_PROTO"),a=Object,s=a.prototype;return zn=o?a.getPrototypeOf:function(r){var o=n(r);if(e(o,i))return o[i];var u=o.constructor;return t(u)&&o instanceof u?u.prototype:o instanceof a?s:null},zn}function hr(){if(Vn)return Un;Vn=1;var e,t,n,r=w(),o=me(),i=ye(),a=an(),s=pr(),u=xn(),l=ve(),c=ae(),d=l("iterator"),f=!1;return[].keys&&("next"in(n=[].keys())?(t=s(s(n)))!==Object.prototype&&(e=t):f=!0),!i(e)||r(function(){var t={};return e[d].call(t)!==t})?e={}:c&&(e=a(e)),o(e[d])||u(e,d,function(){return this}),Un={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function gr(){if(Gn)return Wn;Gn=1;var e=Yt().f,t=de(),n=ve()("toStringTag");return Wn=function(r,o,i){r&&!i&&(r=r.prototype),r&&!t(r,n)&&e(r,n,{configurable:!0,value:o})}}function vr(){if(er)return Qn;er=1;var e=function(){if(Jn)return Zn;Jn=1;var e=ye();return Zn=function(t){return e(t)||null===t}}(),t=String,n=TypeError;return Qn=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function mr(){if(nr)return tr;nr=1;var e=function(){if(Xn)return Yn;Xn=1;var e=D(),t=Wt();return Yn=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}(),t=ye(),n=x(),r=vr();return tr=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,a={};try{(o=e(Object.prototype,"__proto__","set"))(a,[]),i=a instanceof Array}catch(e){}return function(e,a){return n(e),r(a),t(e)?(i?o(e,a):e.__proto__=a,e):e}}():void 0),tr}function yr(){if(or)return rr;or=1;var e=fr(),t=Ht(),n=ae(),r=An(),o=me(),i=function(){if(Kn)return qn;Kn=1;var e=hr().IteratorPrototype,t=an(),n=un(),r=gr(),o=sn(),i=function(){return this};return qn=function(a,s,u,l){var c=s+" Iterator";return a.prototype=t(e,{next:n(+!l,u)}),r(a,c,!1,!0),o[c]=i,a},qn}(),a=pr(),s=mr(),u=gr(),l=ln(),c=xn(),d=ve(),f=sn(),p=hr(),h=r.PROPER,g=r.CONFIGURABLE,v=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,y=d("iterator"),b="keys",E="values",w="entries",C=function(){return this};return rr=function(r,d,p,D,A,S,O){i(p,d,D);var x,N,B,T=function(e){if(e===A&&R)return R;if(!m&&e&&e in I)return I[e];switch(e){case b:case E:case w:return function(){return new p(this,e)}}return function(){return new p(this)}},k=d+" Iterator",F=!1,I=r.prototype,P=I[y]||I["@@iterator"]||A&&I[A],R=!m&&P||T(A),_="Array"===d&&I.entries||P;if(_&&(x=a(_.call(new r)))!==Object.prototype&&x.next&&(n||a(x)===v||(s?s(x,v):o(x[y])||c(x,y,C)),u(x,k,!0,!0),n&&(f[k]=C)),h&&A===E&&P&&P.name!==E&&(!n&&g?l(I,"name",E):(F=!0,R=function(){return t(P,this)})),A)if(N={values:T(E),keys:S?R:T(b),entries:T(w)},O)for(B in N)(m||F||!(B in I))&&c(I,B,N[B]);else e({target:d,proto:!0,forced:m||F},N);return n&&!O||I[y]===R||c(I,y,R,{name:A}),f[d]=R,N},rr}function br(){return ar?ir:(ar=1,ir=function(e,t){return{value:e,done:t}})}function Er(){if(ur)return sr;ur=1;var e=N(),t=function(){if(Ot)return St;Ot=1;var e=ve(),t=an(),n=Yt().f,r=e("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:t(null)}),St=function(e){o[r][e]=!0}}(),n=sn(),r=cn(),o=Yt().f,i=yr(),a=br(),s=ae(),u=Se(),l="Array Iterator",c=r.set,d=r.getterFor(l);sr=i(Array,"Array",function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(n,!1);case"values":return a(t[n],!1)}return a([n,t[n]],!1)},"values");var f=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}return sr}Er();var wr,Cr,Dr,Ar,Sr,Or,xr,Nr={};function Br(){if(Cr)return wr;Cr=1;var e={};return e[ve()("toStringTag")]="z",wr="[object z]"===String(e)}function Tr(){if(Ar)return Dr;Ar=1;var e=Br(),t=me(),n=A(),r=ve()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return Dr=e?n:function(e){var a,s,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(a=o(e),r))?s:i?n(a):"Object"===(u=n(a))&&t(a.callee)?"Arguments":u},Dr}!function(){if(xr)return Nr;xr=1;var e=Br(),t=xn(),n=function(){if(Or)return Sr;Or=1;var e=Br(),t=Tr();return Sr=e?{}.toString:function(){return"[object "+t(this)+"]"}}();e||t(Object.prototype,"toString",n,{unsafe:!0})}();var kr,Fr,Ir,Pr,Rr,_r,Lr,Mr,jr,Hr,zr,$r,Ur,Vr={};function Wr(){if(Fr)return kr;Fr=1;var e=Tr(),t=String;return kr=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}function Gr(){if(Pr)return Ir;Pr=1;var e=be();return Ir=function(){var t=e(this),n="";return t.hasIndices&&(n+="d"),t.global&&(n+="g"),t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.dotAll&&(n+="s"),t.unicode&&(n+="u"),t.unicodeSets&&(n+="v"),t.sticky&&(n+="y"),n}}function qr(){if($r)return zr;$r=1;var e,t,n=Ht(),r=D(),o=Wr(),i=Gr(),a=function(){if(_r)return Rr;_r=1;var e=w(),t=B().RegExp,n=e(function(){var e=t("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),r=n||e(function(){return!t("a","y").sticky}),o=n||e(function(){var e=t("^r","gy");return e.lastIndex=2,null!==e.exec("str")});return Rr={BROKEN_CARET:o,MISSED_STICKY:r,UNSUPPORTED_Y:n}}(),s=le(),u=an(),l=cn().get,c=function(){if(Mr)return Lr;Mr=1;var e=w(),t=B().RegExp;return Lr=e(function(){var e=t(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})}(),d=function(){if(Hr)return jr;Hr=1;var e=w(),t=B().RegExp;return jr=e(function(){var e=t("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})}(),f=s("native-string-replace",String.prototype.replace),p=RegExp.prototype.exec,h=p,g=r("".charAt),v=r("".indexOf),m=r("".replace),y=r("".slice),b=(t=/b*/g,n(p,e=/a/,"a"),n(p,t,"a"),0!==e.lastIndex||0!==t.lastIndex),E=a.BROKEN_CARET,C=void 0!==/()??/.exec("")[1],A=function(e,t){for(var n=e.groups=u(null),r=0;r<t.length;r++){var o=t[r];n[o[0]]=e[o[1]]}};return(b||C||E||c||d)&&(h=function(e){var t,r,a,s=this,u=l(s),c=o(e),d=u.raw;if(d)return d.lastIndex=s.lastIndex,t=n(h,d,c),s.lastIndex=d.lastIndex,t&&u.groups&&A(t,u.groups),t;var w=u.groups,D=E&&s.sticky,S=n(i,s),O=s.source,x=0,N=c;if(D){S=m(S,"y",""),-1===v(S,"g")&&(S+="g"),N=y(c,s.lastIndex);var B=s.lastIndex>0&&g(c,s.lastIndex-1);s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==B&&"\r"!==B&&"\u2028"!==B&&"\u2029"!==B)&&(O="(?: (?:"+O+"))",N=" "+N,x++),r=new RegExp("^(?:"+O+")",S)}C&&(r=new RegExp("^"+O+"$(?!\\s)",S)),b&&(a=s.lastIndex);var T=n(p,D?r:s,N);return D?T?(T.input=c,T[0]=y(T[0],x),T.index=s.lastIndex,s.lastIndex+=T[0].length):s.lastIndex=0:b&&T&&(s.lastIndex=s.global?T.index+T[0].length:a),C&&T&&T.length>1&&n(f,T[0],r,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(T[e]=void 0)}),T&&w&&A(T,w),T}),zr=h}function Kr(){if(Ur)return Vr;Ur=1;var e=fr(),t=qr();return e({target:"RegExp",proto:!0,forced:/./.exec!==t},{exec:t}),Vr}Kr();var Yr,Xr,Zr,Jr={};function Qr(){if(Xr)return Yr;Xr=1;var e=D(),t=Xt(),n=Wr(),r=x(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,d=n(r(s)),f=t(u),p=d.length;return f<0||f>=p?e?"":void 0:(l=i(d,f))<55296||l>56319||f+1===p||(c=i(d,f+1))<56320||c>57343?e?o(d,f):l:e?a(d,f,f+2):c-56320+(l-55296<<10)+65536}};return Yr={codeAt:s(!1),charAt:s(!0)}}!function(){if(Zr)return Jr;Zr=1;var e=Qr().charAt,t=Wr(),n=cn(),r=yr(),o=br(),i="String Iterator",a=n.set,s=n.getterFor(i);r(String,"String",function(e){a(this,{type:i,string:t(e),index:0})},function(){var t,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(t=e(r,i),n.index+=t.length,o(t,!1))})}();var eo,to,no,ro,oo,io,ao,so,uo,lo,co,fo={};function po(){if(ro)return no;ro=1;var e=Qr().charAt;return no=function(t,n,r){return n+(r&&e(t,n).length||1)},no}function ho(){if(so)return ao;so=1;var e=Ht(),t=de(),n=$t(),r=function(){if(io)return oo;io=1;var e=B(),t=w(),n=e.RegExp,r=!t(function(){var e=!0;try{n(".","d")}catch(t){e=!1}var t={},r="",o=e?"dgimsy":"gimsy",i=function(e,n){Object.defineProperty(t,e,{get:function(){return r+=n,!0}})},a={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var s in e&&(a.hasIndices="d"),a)i(s,a[s]);return Object.getOwnPropertyDescriptor(n.prototype,"flags").get.call(t)!==o||r!==o});return oo={correct:r}}(),o=Gr(),i=RegExp.prototype;return ao=r.correct?function(e){return e.flags}:function(a){return r.correct||!n(i,a)||t(a,"flags")?a.flags:e(o,a)}}!function(){if(co)return fo;co=1;var e=Ht(),t=D(),n=function(){if(to)return eo;to=1,Kr();var e=Ht(),t=xn(),n=qr(),r=w(),o=ve(),i=ln(),a=o("species"),s=RegExp.prototype;return eo=function(u,l,c,d){var f=o(u),p=!r(function(){var e={};return e[f]=function(){return 7},7!==""[u](e)}),h=p&&!r(function(){var e=!1,t=/a/;if("split"===u){var n={};n[a]=function(){return t},(t={constructor:n,flags:""})[f]=/./[f]}return t.exec=function(){return e=!0,null},t[f](""),!e});if(!p||!h||c){var g=/./[f],v=l(f,""[u],function(t,r,o,i,a){var u=r.exec;return u===n||u===s.exec?p&&!a?{done:!0,value:e(g,r,o,i)}:{done:!0,value:e(t,o,r,i)}:{done:!1}});t(String.prototype,u,v[0]),t(s,f,v[1])}d&&i(s[f],"sham",!0)},eo}(),r=be(),o=ye(),i=Zt(),a=Wr(),s=x(),u=Gt(),l=po(),c=ho(),d=function(){if(lo)return uo;lo=1;var e=Ht(),t=be(),n=me(),r=A(),o=qr(),i=TypeError;return uo=function(a,s){var u=a.exec;if(n(u)){var l=e(u,a,s);return null!==l&&t(l),l}if("RegExp"===r(a))return e(o,a,s);throw new i("RegExp#exec called on incompatible receiver")},uo}(),f=t("".indexOf);n("match",function(t,n,p){return[function(n){var r=s(this),i=o(n)?u(n,t):void 0;return i?e(i,n,r):new RegExp(n)[t](a(r))},function(e){var t=r(this),o=a(e),s=p(n,t,o);if(s.done)return s.value;var u=a(c(t));if(!~f(u,"g"))return d(t,o);var h=!!~f(u,"u")||!!~f(u,"v");t.lastIndex=0;for(var g,v=[],m=0;null!==(g=d(t,o));){var y=a(g[0]);v[m]=y,""===y&&(t.lastIndex=l(o,i(t.lastIndex),h)),m++}return 0===m?null:v}]})}();var go,vo,mo,yo,bo,Eo,wo,Co,Do,Ao,So,Oo,xo,No,Bo,To,ko,Fo,Io,Po,Ro,_o,Lo,Mo,jo,Ho,zo,$o={},Uo={};function Vo(){if(vo)return go;vo=1;var e=ye(),t=ln();return go=function(n,r){e(r)&&"cause"in r&&t(n,"cause",r.cause)},go}function Wo(){if(Co)return wo;Co=1;var e=ln(),t=function(){if(yo)return mo;yo=1;var e=D(),t=Error,n=e("".replace),r=String(new t("zxcasd").stack),o=/\n\s*at [^:]*:[^\n]*/,i=o.test(r);return mo=function(e,r){if(i&&"string"==typeof e&&!t.prepareStackTrace)for(;r--;)e=n(e,o,"");return e}}(),n=function(){if(Eo)return bo;Eo=1;var e=w(),t=un();return bo=!e(function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",t(1,7)),7!==e.stack)})}(),r=Error.captureStackTrace;return wo=function(o,i,a,s){n&&(r?r(o,i):e(o,"stack",t(a,s)))},wo}function Go(){if(Oo)return So;Oo=1;var e=function(){if(Ao)return Do;Ao=1;var e=A(),t=D();return Do=function(n){if("Function"===e(n))return t(n)}}(),t=Wt(),n=C(),r=e(e.bind);return So=function(e,o){return t(e),void 0===o?e:n?r(e,o):function(){return e.apply(o,arguments)}},So}function qo(){if(No)return xo;No=1;var e=ve(),t=sn(),n=e("iterator"),r=Array.prototype;return xo=function(e){return void 0!==e&&(t.Array===e||r[n]===e)}}function Ko(){if(To)return Bo;To=1;var e=Tr(),t=Gt(),n=O(),r=sn(),o=ve()("iterator");return Bo=function(i){if(!n(i))return t(i,o)||t(i,"@@iterator")||r[e(i)]}}function Yo(){if(Fo)return ko;Fo=1;var e=Ht(),t=Wt(),n=be(),r=Vt(),o=Ko(),i=TypeError;return ko=function(a,s){var u=arguments.length<2?o(a):s;if(t(u))return n(e(u,a));throw new i(r(a)+" is not iterable")},ko}function Xo(){if(Po)return Io;Po=1;var e=Ht(),t=be(),n=Gt();return Io=function(r,o,i){var a,s;t(r);try{if(!(a=n(r,"return"))){if("throw"===o)throw i;return i}a=e(a,r)}catch(e){s=!0,a=e}if("throw"===o)throw i;if(s)throw a;return t(a),i},Io}function Zo(){if(_o)return Ro;_o=1;var e=Go(),t=Ht(),n=be(),r=Vt(),o=qo(),i=Jt(),a=$t(),s=Yo(),u=Ko(),l=Xo(),c=TypeError,d=function(e,t){this.stopped=e,this.result=t},f=d.prototype;return Ro=function(p,h,g){var v,m,y,b,E,w,C,D=g&&g.that,A=!(!g||!g.AS_ENTRIES),S=!(!g||!g.IS_RECORD),O=!(!g||!g.IS_ITERATOR),x=!(!g||!g.INTERRUPTED),N=e(h,D),B=function(e){var t=v;return v=void 0,t&&l(t,"normal"),new d(!0,e)},T=function(e){return A?(n(e),x?N(e[0],e[1],B):N(e[0],e[1])):x?N(e,B):N(e)};if(S)v=p.iterator;else if(O)v=p;else{if(!(m=u(p)))throw new c(r(p)+" is not iterable");if(o(m)){for(y=0,b=i(p);b>y;y++)if((E=T(p[y]))&&a(f,E))return E;return new d(!1)}v=s(p,m)}for(w=S?p.next:v.next;!(C=t(w,v)).done;){var k=C.value;try{E=T(k)}catch(e){if(!v)throw e;l(v,"throw",e)}if("object"==typeof E&&E&&a(f,E))return E}return new d(!1)},Ro}function Jo(){if(Mo)return Lo;Mo=1;var e=Wr();return Lo=function(t,n){return void 0===t?arguments.length<2?"":n:e(t)},Lo}function Qo(){return Ho||(Ho=1,function(){if(jo)return Uo;jo=1;var e=fr(),t=$t(),n=pr(),r=mr(),o=dr(),i=an(),a=ln(),s=un(),u=Vo(),l=Wo(),c=Zo(),d=Jo(),f=ve()("toStringTag"),p=Error,h=[].push,g=function(e,o){var s,m=t(v,this);r?s=r(new p,m?n(this):v):(s=m?this:i(v),a(s,f,"Error")),void 0!==o&&a(s,"message",d(o)),l(s,g,s.stack,1),arguments.length>2&&u(s,arguments[2]);var y=[];return c(e,h,{that:y}),a(s,"errors",y),s};r?r(g,p):o(g,p,{name:!0});var v=g.prototype=i(p.prototype,{constructor:s(1,g),message:s(1,""),name:s(1,"AggregateError")});e({global:!0,constructor:!0,arity:2},{AggregateError:g})}()),$o}zo||(zo=1,Qo());var ei,ti,ni={};ti||(ti=1,function(){if(ei)return ni;ei=1;var e=fr(),t=B();e({global:!0,forced:t.globalThis!==t},{globalThis:t})}());var ri,oi,ii,ai,si,ui,li={};function ci(){return oi?ri:(oi=1,ri={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0})}function di(){if(ai)return ii;ai=1;var e=Mt()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return ii=t===Object.prototype?void 0:t}if(function(){if(si)return li;si=1;var e=B(),t=ci(),n=di(),r=Er(),o=ln(),i=gr(),a=ve()("iterator"),s=r.values,u=function(e,n){if(e){if(e[a]!==s)try{o(e,a,s)}catch(t){e[a]=s}if(i(e,n,!0),t[n])for(var u in r)if(e[u]!==r[u])try{o(e,u,r[u])}catch(t){e[u]=r[u]}}};for(var l in t)u(e[l]&&e[l].prototype,l);u(n,"DOMTokenList")}(),"undefined"==typeof global){if("ActiveXObject"in window){console.error("抱歉,wangEditor V5+ 版本开始,不在支持 IE 浏览器\n Sorry, wangEditor V5+ versions do not support IE browser.")}fi(),pi()}else global&&(null===(ui=global.navigator)||void 0===ui?void 0:ui.userAgent.match("QQBrowser"))&&(fi(),pi());function fi(){"undefined"==typeof globalThis&&(window.globalThis=window)}function pi(){"undefined"==typeof AggregateError&&(window.AggregateError=function(e,t){var n=new Error(t);return n.errors=e,n})}var hi,gi,vi,mi,yi,bi,Ei,wi,Ci,Di,Ai,Si,Oi,xi,Ni,Bi,Ti={};function ki(){if(gi)return hi;gi=1;var e=function(e){return e&&e.Math===Math&&e};return hi=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof y&&y)||e("object"==typeof hi&&hi)||function(){return this}()||Function("return this")()}function Fi(){return mi?vi:(mi=1,vi=function(e){try{return!!e()}catch(e){return!0}})}function Ii(){return bi?yi:(bi=1,yi=!Fi()(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))}function Pi(){if(wi)return Ei;wi=1;var e=Ii(),t=Function.prototype,n=t.apply,r=t.call;return Ei="object"==typeof Reflect&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),Ei}function Ri(){if(Di)return Ci;Di=1;var e=Ii(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return Ci=e?r:function(e){return function(){return n.apply(e,arguments)}},Ci}function _i(){if(Si)return Ai;Si=1;var e=Ri(),t=e({}.toString),n=e("".slice);return Ai=function(e){return n(t(e),8,-1)}}function Li(){if(xi)return Oi;xi=1;var e=_i(),t=Ri();return Oi=function(n){if("Function"===e(n))return t(n)}}function Mi(){if(Bi)return Ni;Bi=1;var e="object"==typeof document&&document.all;return Ni=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}var ji,Hi,zi,$i,Ui={};function Vi(){return Hi?ji:(Hi=1,ji=!Fi()(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function Wi(){if($i)return zi;$i=1;var e=Ii(),t=Function.prototype.call;return zi=e?t.bind(t):function(){return t.apply(t,arguments)},zi}var Gi,qi,Ki,Yi,Xi,Zi,Ji,Qi,ea,ta,na,ra,oa,ia,aa,sa,ua,la,ca,da,fa,pa,ha,ga,va,ma,ya,ba,Ea,wa,Ca,Da,Aa,Sa,Oa,xa,Na,Ba={};function Ta(){if(Gi)return Ba;Gi=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return Ba.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,Ba}function ka(){return Ki?qi:(Ki=1,qi=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function Fa(){if(Xi)return Yi;Xi=1;var e=Ri(),t=Fi(),n=_i(),r=Object,o=e("".split);return Yi=t(function(){return!r("z").propertyIsEnumerable(0)})?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function Ia(){return Ji?Zi:(Ji=1,Zi=function(e){return null==e})}function Pa(){if(ea)return Qi;ea=1;var e=Ia(),t=TypeError;return Qi=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function Ra(){if(na)return ta;na=1;var e=Fa(),t=Pa();return ta=function(n){return e(t(n))}}function _a(){if(oa)return ra;oa=1;var e=Mi();return ra=function(t){return"object"==typeof t?null!==t:e(t)}}function La(){return aa?ia:(aa=1,ia={})}function Ma(){if(ua)return sa;ua=1;var e=La(),t=ki(),n=Mi(),r=function(e){return n(e)?e:void 0};return sa=function(n,o){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][o]||t[n]&&t[n][o]},sa}function ja(){return ca?la:(ca=1,la=Ri()({}.isPrototypeOf))}function Ha(){if(fa)return da;fa=1;var e=ki().navigator,t=e&&e.userAgent;return da=t?String(t):""}function za(){if(ha)return pa;ha=1;var e,t,n=ki(),r=Ha(),o=n.process,i=n.Deno,a=o&&o.versions||i&&i.version,s=a&&a.v8;return s&&(t=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&r&&(!(e=r.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1]),pa=t}function $a(){if(va)return ga;va=1;var e=za(),t=Fi(),n=ki().String;return ga=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),ga}function Ua(){return ya?ma:(ya=1,ma=$a()&&!Symbol.sham&&"symbol"==typeof Symbol.iterator)}function Va(){if(Ea)return ba;Ea=1;var e=Ma(),t=Mi(),n=ja(),r=Object;return ba=Ua()?function(e){return"symbol"==typeof e}:function(o){var i=e("Symbol");return t(i)&&n(i.prototype,r(o))}}function Wa(){if(Ca)return wa;Ca=1;var e=String;return wa=function(t){try{return e(t)}catch(e){return"Object"}}}function Ga(){if(Aa)return Da;Aa=1;var e=Mi(),t=Wa(),n=TypeError;return Da=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function qa(){if(Oa)return Sa;Oa=1;var e=Ga(),t=Ia();return Sa=function(n,r){var o=n[r];return t(o)?void 0:e(o)},Sa}function Ka(){if(Na)return xa;Na=1;var e=Wi(),t=Mi(),n=_a(),r=TypeError;return xa=function(o,i){var a,s;if("string"===i&&t(a=o.toString)&&!n(s=e(a,o)))return s;if(t(a=o.valueOf)&&!n(s=e(a,o)))return s;if("string"!==i&&t(a=o.toString)&&!n(s=e(a,o)))return s;throw new r("Can't convert object to primitive value")},xa}var Ya,Xa,Za,Ja,Qa,es,ts,ns,rs,os,is,as,ss,us,ls,cs,ds,fs,ps,hs,gs,vs,ms,ys,bs,Es,ws,Cs,Ds={exports:{}};function As(){return Xa?Ya:(Xa=1,Ya=!0)}function Ss(){if(Ja)return Za;Ja=1;var e=ki(),t=Object.defineProperty;return Za=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function Os(){if(Qa)return Ds.exports;Qa=1;var e=As(),t=ki(),n=Ss(),r="__core-js_shared__",o=Ds.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.49.0",mode:e?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"}),Ds.exports}function xs(){if(ts)return es;ts=1;var e=Os();return es=function(t,n){return e[t]||(e[t]=n||{})}}function Ns(){if(rs)return ns;rs=1;var e=Pa(),t=Object;return ns=function(n){return t(e(n))}}function Bs(){if(is)return os;is=1;var e=Ri(),t=Ns(),n=e({}.hasOwnProperty);return os=Object.hasOwn||function(e,r){return n(t(e),r)}}function Ts(){if(ss)return as;ss=1;var e=Ri(),t=0,n=Math.random(),r=e(1.1.toString);return as=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function ks(){if(ls)return us;ls=1;var e=ki(),t=xs(),n=Bs(),r=Ts(),o=$a(),i=Ua(),a=e.Symbol,s=t("wks"),u=i?a.for||a:a&&a.withoutSetter||r;return us=function(e){return n(s,e)||(s[e]=o&&n(a,e)?a[e]:u("Symbol."+e)),s[e]}}function Fs(){if(ds)return cs;ds=1;var e=Wi(),t=_a(),n=Va(),r=qa(),o=Ka(),i=TypeError,a=ks()("toPrimitive");return cs=function(s,u){if(!t(s)||n(s))return s;var l,c=r(s,a);if(c){if(void 0===u&&(u="default"),l=e(c,s,u),!t(l)||n(l))return l;throw new i("Can't convert object to primitive value")}return void 0===u&&(u="number"),o(s,u)}}function Is(){if(ps)return fs;ps=1;var e=Fs(),t=Va();return fs=function(n){var r=e(n,"string");return t(r)?r:r+""}}function Ps(){if(gs)return hs;gs=1;var e=ki(),t=_a(),n=e.document,r=t(n)&&t(n.createElement);return hs=function(e){return r?n.createElement(e):{}}}function Rs(){if(ms)return vs;ms=1;var e=Vi(),t=Fi(),n=Ps();return vs=!e&&!t(function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a})}function _s(){if(ys)return Ui;ys=1;var e=Vi(),t=Wi(),n=Ta(),r=ka(),o=Ra(),i=Is(),a=Bs(),s=Rs(),u=Object.getOwnPropertyDescriptor;return Ui.f=e?u:function(e,l){if(e=o(e),l=i(l),s)try{return u(e,l)}catch(e){}if(a(e,l))return r(!t(n.f,e,l),e[l])},Ui}function Ls(){if(Es)return bs;Es=1;var e=Fi(),t=Mi(),n=/#|\.prototype\./,r=function(n,r){var u=i[o(n)];return u===s||u!==a&&(t(r)?e(r):!!r)},o=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},i=r.data={},a=r.NATIVE="N",s=r.POLYFILL="P";return bs=r}function Ms(){if(Cs)return ws;Cs=1;var e=Li(),t=Ga(),n=Ii(),r=e(e.bind);return ws=function(e,o){return t(e),void 0===o?e:n?r(e,o):function(){return e.apply(o,arguments)}},ws}var js,Hs,zs,$s,Us,Vs,Ws,Gs,qs,Ks,Ys,Xs,Zs,Js,Qs,eu,tu,nu,ru,ou,iu,au,su,uu,lu,cu,du,fu,pu,hu,gu,vu,mu,yu,bu,Eu,wu,Cu,Du,Au,Su={};function Ou(){return Hs?js:(Hs=1,js=Vi()&&Fi()(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}))}function xu(){if($s)return zs;$s=1;var e=_a(),t=String,n=TypeError;return zs=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}function Nu(){if(Us)return Su;Us=1;var e=Vi(),t=Rs(),n=Ou(),r=xu(),o=Is(),i=TypeError,a=Object.defineProperty,s=Object.getOwnPropertyDescriptor,u="enumerable",l="configurable",c="writable";return Su.f=e?n?function(e,t,n){if(r(e),t=o(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&c in n&&!n[c]){var i=s(e,t);i&&i[c]&&(e[t]=n.value,n={configurable:l in n?n[l]:i[l],enumerable:u in n?n[u]:i[u],writable:!1})}return a(e,t,n)}:a:function(e,n,s){if(r(e),n=o(n),r(s),t)try{return a(e,n,s)}catch(e){}if("get"in s||"set"in s)throw new i("Accessors not supported");return"value"in s&&(e[n]=s.value),e},Su}function Bu(){if(Ws)return Vs;Ws=1;var e=Vi(),t=Nu(),n=ka();return Vs=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}function Tu(){if(qs)return Gs;qs=1;var e=ki(),t=Pi(),n=Li(),r=Mi(),o=_s().f,i=Ls(),a=La(),s=Ms(),u=Bu(),l=Bs(),c=function(e){var n=function(r,o,i){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,o)}return new e(r,o,i)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return Gs=function(t,d){var f,p,h,g,v,m,y,b,E,w=t.target,C=t.global,D=t.stat,A=t.proto,S=C?e:D?e[w]:e[w]&&e[w].prototype,O=C?a:a[w]||u(a,w,{})[w],x=O.prototype;for(g in d)p=!(f=i(C?g:w+(D?".":"#")+g,t.forced))&&S&&l(S,g),m=O[g],p&&(y=t.dontCallGetSet?(E=o(S,g))&&E.value:S[g]),v=p&&y?y:d[g],(f||A||typeof m!=typeof v)&&(b=t.bind&&p?s(v,e):t.wrap&&p?c(v):A&&r(v)?n(v):v,(t.sham||v&&v.sham||m&&m.sham)&&u(b,"sham",!0),u(O,g,b),A&&(l(a,h=w+"Prototype")||u(a,h,{}),u(a[h],g,v),t.real&&x&&(f||!x[g])&&u(x,g,v)))}}function ku(){if(Ys)return Ks;Ys=1;var e=_i();return Ks=Array.isArray||function(t){return"Array"===e(t)}}function Fu(){if(Zs)return Xs;Zs=1;var e=Math.ceil,t=Math.floor;return Xs=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},Xs}function Iu(){if(Qs)return Js;Qs=1;var e=Fu();return Js=function(t){var n=+t;return n!=n||0===n?0:e(n)}}function Pu(){if(tu)return eu;tu=1;var e=Iu(),t=Math.min;return eu=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function Ru(){if(ru)return nu;ru=1;var e=Pu();return nu=function(t){return e(t.length)}}function _u(){if(iu)return ou;iu=1;var e=TypeError;return ou=function(t){if(t>9007199254740991)throw new e("Maximum allowed index exceeded");return t}}function Lu(){if(su)return au;su=1;var e=Vi(),t=Nu(),n=ka();return au=function(r,o,i){e?t.f(r,o,n(0,i)):r[o]=i}}function Mu(){if(lu)return uu;lu=1;var e=Vi(),t=ku(),n=TypeError,r=Object.getOwnPropertyDescriptor,o=e&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();return uu=o?function(e,o){if(t(e)&&!r(e,"length").writable)throw new n("Cannot set read only .length");return e.length=o}:function(e,t){return e.length=t},uu}function ju(){if(du)return cu;du=1;var e={};return e[ks()("toStringTag")]="z",cu="[object z]"===String(e)}function Hu(){if(pu)return fu;pu=1;var e=ju(),t=Mi(),n=_i(),r=ks()("toStringTag"),o=Object,i="Arguments"===n(function(){return arguments}());return fu=e?n:function(e){var a,s,u;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(s=function(e,t){try{return e[t]}catch(e){}}(a=o(e),r))?s:i?n(a):"Object"===(u=n(a))&&t(a.callee)?"Arguments":u},fu}function zu(){if(gu)return hu;gu=1;var e=Ri(),t=Mi(),n=Os(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),hu=n.inspectSource}function $u(){if(mu)return vu;mu=1;var e=Ri(),t=Fi(),n=Mi(),r=Hu(),o=Ma(),i=zu(),a=function(){},s=o("Reflect","construct"),u=/^\s*(?:class|function)\b/,l=e(u.exec),c=!u.test(a),d=function(e){if(!n(e))return!1;try{return s(a,[],e),!0}catch(e){return!1}},f=function(e){if(!n(e))return!1;switch(r(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return c||!!l(u,i(e))}catch(e){return!0}};return f.sham=!0,vu=!s||t(function(){var e;return d(d.call)||!d(Object)||!d(function(){e=!0})||e})?f:d}function Uu(){if(bu)return yu;bu=1;var e=ku(),t=$u(),n=_a(),r=ks()("species"),o=Array;return yu=function(i){var a;return e(i)&&(a=i.constructor,(t(a)&&(a===o||e(a.prototype))||n(a)&&null===(a=a[r]))&&(a=void 0)),void 0===a?o:a},yu}function Vu(){if(wu)return Eu;wu=1;var e=Uu();return Eu=function(t,n){return new(e(t))(0===n?0:n)}}function Wu(){if(Du)return Cu;Du=1;var e=Fi(),t=ks(),n=za(),r=t("species");return Cu=function(t){return n>=51||!e(function(){var e=[];return(e.constructor={})[r]=function(){return{foo:1}},1!==e[t](Boolean).foo})},Cu}var Gu,qu,Ku={},Yu={};function Xu(){if(qu)return Gu;qu=1;var e=Hu(),t=String;return Gu=function(n){if("Symbol"===e(n))throw new TypeError("Cannot convert a Symbol value to a string");return t(n)}}var Zu,Ju,Qu,el,tl,nl,rl,ol,il,al,sl,ul,ll,cl,dl,fl,pl,hl,gl,vl={};function ml(){if(Ju)return Zu;Ju=1;var e=Iu(),t=Math.max,n=Math.min;return Zu=function(r,o){var i=e(r);return i<0?t(i+o,0):n(i,o)},Zu}function yl(){if(el)return Qu;el=1;var e=Ra(),t=ml(),n=Ru(),r=function(r){return function(o,i,a){var s=e(o),u=n(s);if(0===u)return!r&&-1;var l,c=t(a,u);if(r&&i!=i){for(;u>c;)if((l=s[c++])!=l)return!0}else for(;u>c;c++)if((r||c in s)&&s[c]===i)return r||c||0;return!r&&-1}};return Qu={includes:r(!0),indexOf:r(!1)}}function bl(){return nl?tl:(nl=1,tl={})}function El(){if(ol)return rl;ol=1;var e=Ri(),t=Bs(),n=Ra(),r=yl().indexOf,o=bl(),i=e([].push);return rl=function(e,a){var s,u=n(e),l=0,c=[];for(s in u)!t(o,s)&&t(u,s)&&i(c,s);for(;a.length>l;)t(u,s=a[l++])&&(~r(c,s)||i(c,s));return c},rl}function wl(){return al?il:(al=1,il=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function Cl(){if(ul)return sl;ul=1;var e=El(),t=wl();return sl=Object.keys||function(n){return e(n,t)},sl}function Dl(){if(ll)return vl;ll=1;var e=Vi(),t=Ou(),n=Nu(),r=xu(),o=Ra(),i=Cl();return vl.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var a,s=o(t),u=i(t),l=u.length,c=0;l>c;)n.f(e,a=u[c++],s[a]);return e},vl}function Al(){return dl?cl:(dl=1,cl=Ma()("document","documentElement"))}function Sl(){if(pl)return fl;pl=1;var e=xs(),t=Ts(),n=e("keys");return fl=function(e){return n[e]||(n[e]=t(e))}}function Ol(){if(gl)return hl;gl=1;var e,t=xu(),n=Dl(),r=wl(),o=bl(),i=Al(),a=Ps(),s="prototype",u="script",l=Sl()("IE_PROTO"),c=function(){},d=function(e){return"<"+u+">"+e+"</"+u+">"},f=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},p=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;p="undefined"!=typeof document?document.domain&&e?f(e):(n=a("iframe"),o="java"+u+":",n.style.display="none",i.appendChild(n),n.src=String(o),(t=n.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):f(e);for(var l=r.length;l--;)delete p[s][r[l]];return p()};return o[l]=!0,hl=Object.create||function(e,r){var o;return null!==e?(c[s]=t(e),o=new c,c[s]=null,o[l]=e):o=p(),void 0===r?o:n.f(o,r)},hl}var xl,Nl={};function Bl(){if(xl)return Nl;xl=1;var e=El(),t=wl().concat("length","prototype");return Nl.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Nl}var Tl,kl,Fl,Il={};function Pl(){return kl?Tl:(kl=1,Tl=Ri()([].slice))}function Rl(){if(Fl)return Il;Fl=1;var e=_i(),t=Ra(),n=Bl().f,r=Pl(),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];return Il.f=function(i){return o&&"Window"===e(i)?function(e){try{return n(e)}catch(e){return r(o)}}(i):n(t(i))},Il}var _l,Ll,Ml,jl,Hl,zl={};function $l(){return _l||(_l=1,zl.f=Object.getOwnPropertySymbols),zl}function Ul(){if(Ml)return Ll;Ml=1;var e=Bu();return Ll=function(t,n,r,o){return o&&o.enumerable?t[n]=r:e(t,n,r),t}}function Vl(){if(Hl)return jl;Hl=1;var e=Nu();return jl=function(t,n,r){return e.f(t,n,r)}}var Wl,Gl,ql,Kl,Yl,Xl,Zl,Jl,Ql,ec,tc,nc,rc,oc,ic,ac,sc={};function uc(){if(Wl)return sc;Wl=1;var e=ks();return sc.f=e,sc}function lc(){if(ql)return Gl;ql=1;var e=La(),t=Bs(),n=uc(),r=Nu().f;return Gl=function(o){var i=e.Symbol||(e.Symbol={});t(i,o)||r(i,o,{value:n.f(o)})}}function cc(){if(Yl)return Kl;Yl=1;var e=Wi(),t=Ma(),n=ks(),r=Ul();return Kl=function(){var o=t("Symbol"),i=o&&o.prototype,a=i&&i.valueOf,s=n("toPrimitive");i&&!i[s]&&r(i,s,function(t){return e(a,this)},{arity:1})}}function dc(){if(Zl)return Xl;Zl=1;var e=ju(),t=Hu();return Xl=e?{}.toString:function(){return"[object "+t(this)+"]"}}function fc(){if(Ql)return Jl;Ql=1;var e=ju(),t=Nu().f,n=Bu(),r=Bs(),o=dc(),i=ks()("toStringTag");return Jl=function(a,s,u,l){var c=u?a:a&&a.prototype;c&&(r(c,i)||t(c,i,{configurable:!0,value:s}),l&&!e&&n(c,"toString",o))}}function pc(){if(tc)return ec;tc=1;var e=ki(),t=Mi(),n=e.WeakMap;return ec=t(n)&&/native code/.test(String(n))}function hc(){if(rc)return nc;rc=1;var e,t,n,r=pc(),o=ki(),i=_a(),a=Bu(),s=Bs(),u=Os(),l=Sl(),c=bl(),d="Object already initialized",f=o.TypeError,p=o.WeakMap;if(r||u.state){var h=u.state||(u.state=new p);h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new f(d);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var g=l("state");c[g]=!0,e=function(e,t){if(s(e,g))throw new f(d);return t.facade=e,a(e,g,t),t},t=function(e){return s(e,g)?e[g]:{}},n=function(e){return s(e,g)}}return nc={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!i(n)||(r=t(n)).type!==e)throw new f("Incompatible receiver, "+e+" required");return r}}}}function gc(){if(ic)return oc;ic=1;var e=Ms(),t=Fa(),n=Ns(),r=Ru(),o=Vu(),i=Lu(),a=function(a){var s=1===a,u=2===a,l=3===a,c=4===a,d=6===a,f=7===a,p=5===a||d;return function(h,g,v){for(var m,y,b=n(h),E=t(b),w=r(E),C=e(g,v),D=0,A=0,S=s?o(h,w):u||f?o(h,0):void 0;w>D;D++)if((p||D in E)&&(y=C(m=E[D],D,b),a))if(s)i(S,D,y);else if(y)switch(a){case 3:return!0;case 5:return m;case 6:return D;case 2:i(S,A++,m)}else switch(a){case 4:return!1;case 7:i(S,A++,m)}return d?-1:l||c?c:S}};return oc={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)}}var vc,mc,yc,bc={};function Ec(){return mc?vc:(mc=1,vc=$a()&&!!Symbol.for&&!!Symbol.keyFor)}var wc,Cc={};var Dc,Ac,Sc,Oc,xc,Nc,Bc,Tc={};function kc(){if(Ac)return Dc;Ac=1;var e=_a(),t=hc().get;return Dc=function(n){if(!e(n))return!1;var r=t(n);return!!r&&"RawJSON"===r.type},Dc}function Fc(){if(Oc)return Sc;Oc=1;var e=Ri(),t=Bs(),n=SyntaxError,r=parseInt,o=String.fromCharCode,i=e("".charAt),a=e("".slice),s=e(/./.exec),u={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},l=/^[\da-f]{4}$/i,c=/^[\u0000-\u001F]$/;return Sc=function(e,d){for(var f=!0,p="";d<e.length;){var h=i(e,d);if("\\"===h){var g=a(e,d,d+2);if(t(u,g))p+=u[g],d+=2;else{if("\\u"!==g)throw new n('Unknown escape sequence: "'+g+'"');var v=a(e,d+=2,d+4);if(!s(l,v))throw new n("Bad Unicode escape at: "+d);p+=o(r(v,16)),d+=4}}else{if('"'===h){f=!1,d++;break}if(s(c,h))throw new n("Bad control character in string literal at: "+d);p+=h,d++}}if(f)throw new n("Unterminated string at: "+d);return{value:p,end:d}},Sc}function Ic(){return Nc?xc:(Nc=1,xc=!Fi()(function(){var e="9007199254740993",t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e}))}var Pc,Rc,_c={};function Lc(){return Rc||(Rc=1,function(){if(ac)return Yu;ac=1;var e=Tu(),t=ki(),n=Wi(),r=Ri(),o=As(),i=Vi(),a=$a(),s=Fi(),u=Bs(),l=ja(),c=xu(),d=Ra(),f=Is(),p=Xu(),h=ka(),g=Ol(),v=Cl(),m=Bl(),y=Rl(),b=$l(),E=_s(),w=Nu(),C=Dl(),D=Ta(),A=Ul(),S=Vl(),O=xs(),x=Sl(),N=bl(),B=Ts(),T=ks(),k=uc(),F=lc(),I=cc(),P=fc(),R=hc(),_=gc().forEach,L=x("hidden"),M="Symbol",j="prototype",H=R.set,z=R.getterFor(M),$=Object[j],U=t.Symbol,V=U&&U[j],W=t.RangeError,G=t.TypeError,q=t.QObject,K=E.f,Y=w.f,X=y.f,Z=D.f,J=r([].push),Q=O("symbols"),ee=O("op-symbols"),te=O("wks"),ne=!q||!q[j]||!q[j].findChild,re=function(e,t,n){var r=K($,t);return r&&delete $[t],Y(e,t,n),r&&e!==$&&Y($,t,r),e},oe=i&&s(function(){return 7!==g(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a})?re:Y,ie=function(e,t){var n=Q[e]=g(V);return H(n,{type:M,tag:e,description:t}),i||(n.description=t),n},ae=function(e,t,n){e===$&&ae(ee,t,n),c(e);var r=f(t);return c(n),u(Q,r)?(("enumerable"in n?!n.enumerable:!u(e,r)||u(e,L)&&e[L][r])?(u(e,L)||Y(e,L,h(1,g(null))),e[L][r]=!0):(u(e,L)&&e[L][r]&&(e[L][r]=!1),n=g(n,{enumerable:h(0,!1)})),oe(e,r,n)):Y(e,r,n)},se=function(e,t){c(e);var r=d(t),o=v(r).concat(de(r));return _(o,function(t){i&&!n(ue,r,t)||ae(e,t,r[t])}),e},ue=function(e){var t=f(e),r=n(Z,this,t);return!(this===$&&u(Q,t)&&!u(ee,t))&&(!(r||!u(this,t)||!u(Q,t)||u(this,L)&&this[L][t])||r)},le=function(e,t){var n=d(e),r=f(t);if(n!==$||!u(Q,r)||u(ee,r)){var o=K(n,r);return!o||!u(Q,r)||u(n,L)&&n[L][r]||(o.enumerable=!0),o}},ce=function(e){var t=X(d(e)),n=[];return _(t,function(e){u(Q,e)||u(N,e)||J(n,e)}),n},de=function(e){var t=e===$,n=X(t?ee:d(e)),r=[];return _(n,function(e){!u(Q,e)||t&&!u($,e)||J(r,Q[e])}),r};a||(U=function(){if(l(V,this))throw new G("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?p(arguments[0]):void 0,r=B(e),o=function(e){var i=void 0===this?t:this;i===$&&n(o,ee,e),u(i,L)&&u(i[L],r)&&(i[L][r]=!1);var a=h(1,e);try{oe(i,r,a)}catch(e){if(!(e instanceof W))throw e;re(i,r,a)}};return i&&ne&&oe($,r,{configurable:!0,set:o}),ie(r,e)},A(V=U[j],"toString",function(){return z(this).tag}),A(U,"withoutSetter",function(e){return ie(B(e),e)}),D.f=ue,w.f=ae,C.f=se,E.f=le,m.f=y.f=ce,b.f=de,k.f=function(e){return ie(T(e),e)},i&&(S(V,"description",{configurable:!0,get:function(){return z(this).description}}),o||A($,"propertyIsEnumerable",ue,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!a,sham:!a},{Symbol:U}),_(v(te),function(e){F(e)}),e({target:M,stat:!0,forced:!a},{useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),e({target:"Object",stat:!0,forced:!a,sham:!i},{create:function(e,t){return void 0===t?g(e):se(g(e),t)},defineProperty:ae,defineProperties:se,getOwnPropertyDescriptor:le}),e({target:"Object",stat:!0,forced:!a},{getOwnPropertyNames:ce}),I(),P(U,M),N[L]=!0}(),function(){if(yc)return bc;yc=1;var e=Tu(),t=Ma(),n=Bs(),r=Xu(),o=xs(),i=Ec(),a=o("string-to-symbol-registry"),s=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{for:function(e){var o=r(e);if(n(a,o))return a[o];var i=t("Symbol")(o);return a[o]=i,s[i]=o,i}})}(),function(){if(wc)return Cc;wc=1;var e=Tu(),t=Bs(),n=Va(),r=Wa(),o=xs(),i=Ec(),a=o("symbol-to-string-registry");e({target:"Symbol",stat:!0,forced:!i},{keyFor:function(e){if(!n(e))throw new TypeError(r(e)+" is not a symbol");if(t(a,e))return a[e]}})}(),function(){if(Bc)return Tc;Bc=1;var e=Tu(),t=Ma(),n=Pi(),r=Wi(),o=Ri(),i=Fi(),a=ku(),s=Mi(),u=kc(),l=Va(),c=_i(),d=Xu(),f=Pl(),p=Fc(),h=Ts(),g=$a(),v=Ic(),m=String,y=t("JSON","stringify"),b=o(/./.exec),E=o("".charAt),w=o("".charCodeAt),C=o("".replace),D=o("".slice),A=o([].push),S=o(1.1.toString),O=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,N=/^[\uDC00-\uDFFF]$/,B=h(),T=B.length,k=!g||i(function(){var e=t("Symbol")("stringify detection");return"[null]"!==y([e])||"{}"!==y({a:e})||"{}"!==y(Object(e))}),F=i(function(){return'"\\udf06\\ud834"'!==y("\udf06\ud834")||'"\\udead"'!==y("\udead")}),I=k?function(e,t){var o=f(arguments),i=R(t);if(s(i)||void 0!==e&&!l(e))return o[1]=function(e,t){if(s(i)&&(t=r(i,this,m(e),t)),!l(t))return t},n(y,null,o)}:y,P=function(e,t,n){var r=E(n,t-1),o=E(n,t+1);return b(x,e)&&!b(N,o)||b(N,e)&&!b(x,r)?"\\u"+S(w(e,0),16):e},R=function(e){if(s(e))return e;if(a(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];"string"==typeof o?A(n,o):"number"!=typeof o&&"Number"!==c(o)&&"String"!==c(o)||A(n,d(o))}var i=n.length,u=!0;return function(e,t){if(u)return u=!1,t;if(a(this))return t;for(var r=0;r<i;r++)if(n[r]===e)return t}}};y&&e({target:"JSON",stat:!0,arity:3,forced:k||F||!v},{stringify:function(e,t,n){var o=R(t),i=[],a=I(e,function(e,t){var n=s(o)?r(o,this,m(e),t):t;return!v&&u(n)?B+(A(i,n.rawJSON)-1):n},n);if("string"!=typeof a)return a;if(F&&(a=C(a,O,P)),v)return a;for(var l="",c=a.length,d=0;d<c;d++){var f=E(a,d);if('"'===f){var h=p(a,++d).end-1,g=D(a,d,h);l+=D(g,0,T)===B?i[D(g,T)]:'"'+g+'"',d=h}else l+=f}return l}})}(),function(){if(Pc)return _c;Pc=1;var e=Tu(),t=$a(),n=Fi(),r=$l(),o=Ns();e({target:"Object",stat:!0,forced:!t||n(function(){r.f(1)})},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(o(e)):[]}})}()),Ku}var Mc,jc={};function Hc(){return Mc||(Mc=1,lc()("asyncDispose")),jc}var zc;var $c,Uc={};function Vc(){return $c||($c=1,lc()("dispose")),Uc}var Wc;var Gc;var qc,Kc={};function Yc(){return qc||(qc=1,lc()("iterator")),Kc}var Xc;var Zc;var Jc;var Qc;var ed;var td;var nd,rd={};var od,id={};var ad;var sd,ud,ld,cd={};function dd(){return ld?ud:(ld=1,function(){if(Au)return Ti;Au=1;var e=Tu(),t=Fi(),n=ku(),r=_a(),o=Ns(),i=Ru(),a=_u(),s=Lu(),u=Mu(),l=Vu(),c=Wu(),d=ks(),f=za(),p=d("isConcatSpreadable"),h=f>=51||!t(function(){var e=[];return e[p]=!1,e.concat()[0]!==e}),g=function(e){if(!r(e))return!1;var t=e[p];return void 0!==t?!!t:n(e)};e({target:"Array",proto:!0,arity:1,forced:!h||!c("concat")},{concat:function(e){var t,n,r,c,d,f=o(this),p=l(f,0),h=0;for(t=-1,r=arguments.length;t<r;t++)if(g(d=-1===t?f:arguments[t]))for(c=i(d),a(h+c),n=0;n<c;n++,h++)n in d&&s(p,h,d[n]);else a(h+1),s(p,h++,d);return u(p,h),p}})}(),Lc(),Hc(),zc||(zc=1,lc()("asyncIterator")),Vc(),Wc||(Wc=1,lc()("hasInstance")),Gc||(Gc=1,lc()("isConcatSpreadable")),Yc(),Xc||(Xc=1,lc()("match")),Zc||(Zc=1,lc()("matchAll")),Jc||(Jc=1,lc()("replace")),Qc||(Qc=1,lc()("search")),ed||(ed=1,lc()("species")),td||(td=1,lc()("split")),function(){if(nd)return rd;nd=1;var e=lc(),t=cc();e("toPrimitive"),t()}(),function(){if(od)return id;od=1;var e=Ma(),t=lc(),n=fc();t("toStringTag"),n(e("Symbol"),"Symbol")}(),ad||(ad=1,lc()("unscopables")),function(){if(sd)return cd;sd=1;var e=ki();fc()(e.JSON,"JSON",!0)}(),ud=La().Symbol)}var fd,pd,hd,gd,vd,md,yd,bd,Ed,wd,Cd,Dd,Ad,Sd,Od,xd,Nd,Bd,Td,kd,Fd,Id,Pd,Rd,_d,Ld,Md,jd,Hd,zd,$d,Ud,Vd,Wd={};function Gd(){return pd?fd:(pd=1,fd=function(){})}function qd(){return gd?hd:(gd=1,hd={})}function Kd(){if(md)return vd;md=1;var e=Vi(),t=Bs(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,o=t(n,"name"),i=o&&"something"===function(){}.name,a=o&&(!e||e&&r(n,"name").configurable);return vd={EXISTS:o,PROPER:i,CONFIGURABLE:a}}function Yd(){return bd||(bd=1,yd=!Fi()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),yd}function Xd(){if(wd)return Ed;wd=1;var e=Bs(),t=Mi(),n=Ns(),r=Sl(),o=Yd(),i=r("IE_PROTO"),a=Object,s=a.prototype;return Ed=o?a.getPrototypeOf:function(r){var o=n(r);if(e(o,i))return o[i];var u=o.constructor;return t(u)&&o instanceof u?u.prototype:o instanceof a?s:null},Ed}function Zd(){if(Dd)return Cd;Dd=1;var e,t,n,r=Fi(),o=Mi(),i=_a(),a=Ol(),s=Xd(),u=Ul(),l=ks(),c=As(),d=l("iterator"),f=!1;return[].keys&&("next"in(n=[].keys())?(t=s(s(n)))!==Object.prototype&&(e=t):f=!0),!i(e)||r(function(){var t={};return e[d].call(t)!==t})?e={}:c&&(e=a(e)),o(e[d])||u(e,d,function(){return this}),Cd={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:f}}function Jd(){if(Sd)return Ad;Sd=1;var e=Zd().IteratorPrototype,t=Ol(),n=ka(),r=fc(),o=qd(),i=function(){return this};return Ad=function(a,s,u,l){var c=s+" Iterator";return a.prototype=t(e,{next:n(+!l,u)}),r(a,c,!1,!0),o[c]=i,a},Ad}function Qd(){if(xd)return Od;xd=1;var e=Ri(),t=Ga();return Od=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}function ef(){if(Bd)return Nd;Bd=1;var e=_a();return Nd=function(t){return e(t)||null===t}}function tf(){if(kd)return Td;kd=1;var e=ef(),t=String,n=TypeError;return Td=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function nf(){if(Id)return Fd;Id=1;var e=Qd(),t=_a(),n=Pa(),r=tf();return Fd=Object.setPrototypeOf||("__proto__"in{}?function(){var o,i=!1,a={};try{(o=e(Object.prototype,"__proto__","set"))(a,[]),i=a instanceof Array}catch(e){}return function(e,a){return n(e),r(a),t(e)?(i?o(e,a):e.__proto__=a,e):e}}():void 0),Fd}function rf(){if(Rd)return Pd;Rd=1;var e=Tu(),t=Wi(),n=As(),r=Kd(),o=Mi(),i=Jd(),a=Xd(),s=nf(),u=fc(),l=Bu(),c=Ul(),d=ks(),f=qd(),p=Zd(),h=r.PROPER,g=r.CONFIGURABLE,v=p.IteratorPrototype,m=p.BUGGY_SAFARI_ITERATORS,y=d("iterator"),b="keys",E="values",w="entries",C=function(){return this};return Pd=function(r,d,p,D,A,S,O){i(p,d,D);var x,N,B,T=function(e){if(e===A&&R)return R;if(!m&&e&&e in I)return I[e];switch(e){case b:case E:case w:return function(){return new p(this,e)}}return function(){return new p(this)}},k=d+" Iterator",F=!1,I=r.prototype,P=I[y]||I["@@iterator"]||A&&I[A],R=!m&&P||T(A),_="Array"===d&&I.entries||P;if(_&&(x=a(_.call(new r)))!==Object.prototype&&x.next&&(n||a(x)===v||(s?s(x,v):o(x[y])||c(x,y,C)),u(x,k,!0,!0),n&&(f[k]=C)),h&&A===E&&P&&P.name!==E&&(!n&&g?l(I,"name",E):(F=!0,R=function(){return t(P,this)})),A)if(N={values:T(E),keys:S?R:T(b),entries:T(w)},O)for(B in N)(m||F||!(B in I))&&c(I,B,N[B]);else e({target:d,proto:!0,forced:m||F},N);return n&&!O||I[y]===R||c(I,y,R,{name:A}),f[d]=R,N},Pd}function of(){return Ld?_d:(Ld=1,_d=function(e,t){return{value:e,done:t}})}function af(){if(jd)return Md;jd=1;var e=Ra(),t=Gd(),n=qd(),r=hc(),o=Nu().f,i=rf(),a=of(),s=As(),u=Vi(),l="Array Iterator",c=r.set,d=r.getterFor(l);Md=i(Array,"Array",function(t,n){c(this,{type:l,target:e(t),index:0,kind:n})},function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,a(void 0,!0);switch(e.kind){case"keys":return a(n,!1);case"values":return a(t[n],!1)}return a([n,t[n]],!1)},"values");var f=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&u&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}return Md}function sf(){return zd?Hd:(zd=1,Hd={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0})}function uf(){if($d)return Wd;$d=1,af();var e=sf(),t=ki(),n=fc(),r=qd();for(var o in e)n(t[o],o),r[o]=r.Array;return Wd}function lf(){if(Vd)return Ud;Vd=1;var e=dd();return uf(),Ud=e}var cf,df={};var ff;var pf;var hf,gf,vf;function mf(){if(vf)return gf;vf=1;var e=lf();return function(){if(cf)return df;cf=1;var e=ks(),t=Nu().f,n=e("metadata"),r=Function.prototype;void 0===r[n]&&t(r,n,{value:null})}(),ff||(ff=1,Hc()),pf||(pf=1,Vc()),hf||(hf=1,lc()("metadata")),gf=e}var yf,bf,Ef;function wf(){if(bf)return yf;bf=1;var e=Ma(),t=Ri(),n=e("Symbol"),r=n.keyFor,o=t(n.prototype.valueOf);return yf=n.isRegisteredSymbol||function(e){try{return void 0!==r(o(e))}catch(e){return!1}}}var Cf,Df,Af;function Sf(){if(Df)return Cf;Df=1;for(var e=xs(),t=Ma(),n=Ri(),r=Va(),o=ks(),i=t("Symbol"),a=i.isWellKnownSymbol,s=t("Object","getOwnPropertyNames"),u=n(i.prototype.valueOf),l=e("wks"),c=0,d=s(i),f=d.length;c<f;c++)try{var p=d[c];r(i[p])&&o(p)}catch(e){}return Cf=function(e){if(a&&a(e))return!0;try{for(var t=u(e),n=0,r=s(l),o=r.length;n<o;n++)if(l[r[n]]==t)return!0}catch(e){}return!1},Cf}var Of;var xf;var Nf;var Bf;var Tf;var kf;var Ff;var If,Pf,Rf,_f,Lf;function Mf(){if(Rf)return Pf;Rf=1;var e=mf();return Ef||(Ef=1,Tu()({target:"Symbol",stat:!0},{isRegisteredSymbol:wf()})),Af||(Af=1,Tu()({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:Sf()})),Of||(Of=1,lc()("customMatcher")),xf||(xf=1,lc()("observable")),Nf||(Nf=1,Tu()({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:wf()})),Bf||(Bf=1,Tu()({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:Sf()})),Tf||(Tf=1,lc()("matcher")),kf||(kf=1,lc()("metadataKey")),Ff||(Ff=1,lc()("patternMatch")),If||(If=1,lc()("replaceAll")),Pf=e}function jf(){return Lf?_f:(Lf=1,_f=Mf())}var Hf,zf,$f,Uf,Vf,Wf,Gf,qf,Kf,Yf,Xf,Zf,Jf,Qf=b(jf()),ep={};function tp(){if(zf)return Hf;zf=1;var e=Ri(),t=Iu(),n=Xu(),r=Pa(),o=e("".charAt),i=e("".charCodeAt),a=e("".slice),s=function(e){return function(s,u){var l,c,d=n(r(s)),f=t(u),p=d.length;return f<0||f>=p?e?"":void 0:(l=i(d,f))<55296||l>56319||f+1===p||(c=i(d,f+1))<56320||c>57343?e?o(d,f):l:e?a(d,f,f+2):c-56320+(l-55296<<10)+65536}};return Hf={codeAt:s(!1),charAt:s(!0)}}function np(){return Vf?Uf:(Vf=1,af(),function(){if($f)return ep;$f=1;var e=tp().charAt,t=Xu(),n=hc(),r=rf(),o=of(),i="String Iterator",a=n.set,s=n.getterFor(i);r(String,"String",function(e){a(this,{type:i,string:t(e),index:0})},function(){var t,n=s(this),r=n.string,i=n.index;return i>=r.length?o(void 0,!0):(t=e(r,i),n.index+=t.length,o(t,!1))})}(),Yc(),Uf=uc().f("iterator"))}function rp(){if(Gf)return Wf;Gf=1;var e=np();return uf(),Wf=e}function op(){return Kf?qf:(Kf=1,qf=rp())}function ip(){return Xf?Yf:(Xf=1,Yf=op())}function ap(){return Jf?Zf:(Jf=1,Zf=ip())}var sp=b(ap());function up(e){return up="function"==typeof Qf&&"symbol"==typeof sp?function(e){return typeof e}:function(e){return e&&"function"==typeof Qf&&e.constructor===Qf&&e!==Qf.prototype?"symbol":typeof e},up(e)}var lp,cp={};if(function(){if(lp)return cp;lp=1;var e=fr(),t=w(),n=N(),r=gn().f,o=Se();e({target:"Object",stat:!0,forced:!o||t(function(){r(1)}),sham:!o},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}})}(),"object"===("undefined"==typeof global?"undefined":up(global))){var dp=Object.getOwnPropertyDescriptor(global,"window");global.window&&!dp.set||(global.window=global,global.requestAnimationFrame=function(){},global.navigator={userAgent:""},global.location={hostname:"0.0.0.0",port:0,protocol:"http:"},global.btoa=function(){},global.crypto={getRandomValues:function(e){return nodeCrypto.randomFillSync(e)}}),null!=global.document&&null==global.document.getElementsByTagName&&(global.document.getElementsByTagName=function(){return[]})}var fp={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var o=Cp.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},pp={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var o=wh.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},hp={transform(e,t){var{current:n,affinity:r}=e;if(null!=n){var o=Bp.transform(n,t,{affinity:r});e.current=o,null==o&&e.unref()}}},gp=new WeakMap,vp=new WeakMap,mp=new WeakMap,yp=new WeakMap,bp=new WeakMap,Ep=new WeakMap,wp=new WeakMap,Cp={ancestors(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,r=Cp.levels(e,t);return r=n?r.slice(1):r.slice(0,-1)},common(e,t){for(var n=[],r=0;r<e.length&&r<t.length;r++){var o=e[r];if(o!==t[r])break;n.push(o)}return n},compare(e,t){for(var n=Math.min(e.length,t.length),r=0;r<n;r++){if(e[r]<t[r])return-1;if(e[r]>t[r])return 1}return 0},endsAfter(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return Cp.equals(r,o)&&i>a},endsAt(e,t){var n=e.length,r=e.slice(0,n),o=t.slice(0,n);return Cp.equals(r,o)},endsBefore(e,t){var n=e.length-1,r=e.slice(0,n),o=t.slice(0,n),i=e[n],a=t[n];return Cp.equals(r,o)&&i<a},equals:(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),hasPrevious:e=>e[e.length-1]>0,isAfter:(e,t)=>1===Cp.compare(e,t),isAncestor:(e,t)=>e.length<t.length&&0===Cp.compare(e,t),isBefore:(e,t)=>-1===Cp.compare(e,t),isChild:(e,t)=>e.length===t.length+1&&0===Cp.compare(e,t),isCommon:(e,t)=>e.length<=t.length&&0===Cp.compare(e,t),isDescendant:(e,t)=>e.length>t.length&&0===Cp.compare(e,t),isParent:(e,t)=>e.length+1===t.length&&0===Cp.compare(e,t),isPath:e=>Array.isArray(e)&&e.every(e=>"number"==typeof e),isSibling(e,t){if(e.length!==t.length)return!1;var n=e.slice(0,-1),r=t.slice(0,-1);return e[e.length-1]!==t[t.length-1]&&Cp.equals(n,r)},levels(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,r=[],o=0;o<=e.length;o++)r.push(e.slice(0,o));return n&&r.reverse(),r},next(e){if(0===e.length)throw new Error("Cannot get the next path of a root path [".concat(e,"], because it has no next index."));var t=e[e.length-1];return e.slice(0,-1).concat(t+1)},operationCanTransformPath(e){switch(e.type){case"insert_node":case"remove_node":case"merge_node":case"split_node":case"move_node":return!0;default:return!1}},parent(e){if(0===e.length)throw new Error("Cannot get the parent path of the root path [".concat(e,"]."));return e.slice(0,-1)},previous(e){if(0===e.length)throw new Error("Cannot get the previous path of a root path [".concat(e,"], because it has no previous index."));var t=e[e.length-1];if(t<=0)throw new Error("Cannot get the previous path of a first child path [".concat(e,"] because it would result in a negative index."));return e.slice(0,-1).concat(t-1)},relative(e,t){if(!Cp.isAncestor(t,e)&&!Cp.equals(e,t))throw new Error("Cannot get the relative path of [".concat(e,"] inside ancestor [").concat(t,"], because it is not above or equal to the path."));return e.slice(t.length)},transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)return null;var r=[...e],{affinity:o="forward"}=n;if(0===e.length)return r;switch(t.type){case"insert_node":var{path:i}=t;(Cp.equals(i,r)||Cp.endsBefore(i,r)||Cp.isAncestor(i,r))&&(r[i.length-1]+=1);break;case"remove_node":var{path:a}=t;if(Cp.equals(a,r)||Cp.isAncestor(a,r))return null;Cp.endsBefore(a,r)&&(r[a.length-1]-=1);break;case"merge_node":var{path:s,position:u}=t;Cp.equals(s,r)||Cp.endsBefore(s,r)?r[s.length-1]-=1:Cp.isAncestor(s,r)&&(r[s.length-1]-=1,r[s.length]+=u);break;case"split_node":var{path:l,position:c}=t;if(Cp.equals(l,r)){if("forward"===o)r[r.length-1]+=1;else if("backward"!==o)return null}else Cp.endsBefore(l,r)?r[l.length-1]+=1:Cp.isAncestor(l,r)&&e[l.length]>=c&&(r[l.length-1]+=1,r[l.length]-=c);break;case"move_node":var{path:d,newPath:f}=t;if(Cp.equals(d,f))return r;if(Cp.isAncestor(d,r)||Cp.equals(d,r)){var p=f.slice();return Cp.endsBefore(d,f)&&d.length<f.length&&(p[d.length-1]-=1),p.concat(r.slice(d.length))}Cp.isSibling(d,f)&&(Cp.isAncestor(f,r)||Cp.equals(f,r))?Cp.endsBefore(d,r)?r[d.length-1]-=1:r[d.length-1]+=1:Cp.endsBefore(f,r)||Cp.equals(f,r)||Cp.isAncestor(f,r)?(Cp.endsBefore(d,r)&&(r[d.length-1]-=1),r[f.length-1]+=1):Cp.endsBefore(d,r)&&(Cp.equals(f,r)&&(r[f.length-1]+=1),r[d.length-1]-=1)}return r}};function Dp(e){return Dp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dp(e)}function Ap(e){var t=function(e,t){if("object"!==Dp(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==Dp(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Dp(t)?t:String(t)}function Sp(e,t,n){return(t=Ap(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Op(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var xp=["anchor","focus"];function Np(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var Bp={edges(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{reverse:n=!1}=t,{anchor:r,focus:o}=e;return Bp.isBackward(e)===n?[r,o]:[o,r]},end(e){var[,t]=Bp.edges(e);return t},equals:(e,t)=>wh.equals(e.anchor,t.anchor)&&wh.equals(e.focus,t.focus),surrounds(e,t){var n=Bp.intersection(e,t);return!!n&&Bp.equals(n,t)},includes(e,t){if(yh.isRange(t)){if(Bp.includes(e,t.anchor)||Bp.includes(e,t.focus))return!0;var[n,r]=Bp.edges(e),[o,i]=Bp.edges(t);return wh.isBefore(n,o)&&wh.isAfter(r,i)}var[a,s]=Bp.edges(e),u=!1,l=!1;return yh.isPoint(t)?(u=wh.compare(t,a)>=0,l=wh.compare(t,s)<=0):(u=Cp.compare(t,a.path)>=0,l=Cp.compare(t,s.path)<=0),u&&l},intersection(e,t){var n=Op(e,xp),[r,o]=Bp.edges(e),[i,a]=Bp.edges(t),s=wh.isBefore(r,i)?i:r,u=wh.isBefore(o,a)?o:a;return wh.isBefore(u,s)?null:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Np(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Np(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({anchor:s,focus:u},n)},isBackward(e){var{anchor:t,focus:n}=e;return wh.isAfter(t,n)},isCollapsed(e){var{anchor:t,focus:n}=e;return wh.equals(t,n)},isExpanded:e=>!Bp.isCollapsed(e),isForward:e=>!Bp.isBackward(e),isRange:e=>zp(e)&&wh.isPoint(e.anchor)&&wh.isPoint(e.focus),*points(e){yield[e.anchor,"anchor"],yield[e.focus,"focus"]},start(e){var[t]=Bp.edges(e);return t},transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===e)return null;var r,o,{affinity:i="inward"}=n;if("inward"===i){var a=Bp.isCollapsed(e);Bp.isForward(e)?(r="forward",o=a?r:"backward"):(r="backward",o=a?r:"forward")}else"outward"===i?Bp.isForward(e)?(r="backward",o="forward"):(r="forward",o="backward"):(r=i,o=i);var s=wh.transform(e.anchor,t,{affinity:r}),u=wh.transform(e.focus,t,{affinity:o});return s&&u?{anchor:s,focus:u}:null}},Tp=function(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!zp(e)&&("function"!=typeof e.apply&&(t?_p.isNodeList(e.children):Array.isArray(e.children)))},kp={isAncestor(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return zp(e)&&_p.isNodeList(e.children,{deep:t})},isElement:Tp,isElementList(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Array.isArray(e)&&e.every(e=>kp.isElement(e,{deep:t}))},isElementProps:e=>void 0!==e.children,isElementType:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"type";return Tp(e)&&e[n]===t},matches(e,t){for(var n in t)if("children"!==n&&e[n]!==t[n])return!1;return!0}},Fp=["text"],Ip=["children"];function Pp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Rp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pp(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var _p={ancestor(e,t){var n=_p.get(e,t);if(_p.isText(n))throw new Error("Cannot get the ancestor node at path [".concat(t,"] because it refers to a text node instead: ").concat(Dh.stringify(n)));return n},ancestors(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var r of Cp.ancestors(t,n)){var o=[_p.ancestor(e,r),r];yield o}}()},child(e,t){if(_p.isText(e))throw new Error("Cannot get the child of a text node: ".concat(Dh.stringify(e)));var n=e.children[t];if(null==n)throw new Error("Cannot get child at index `".concat(t,"` in node: ").concat(Dh.stringify(e)));return n},children(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var{reverse:r=!1}=n,o=_p.ancestor(e,t),{children:i}=o,a=r?i.length-1:0;r?a>=0:a<i.length;){var s=_p.child(o,a),u=t.concat(a);yield[s,u],a=r?a-1:a+1}}()},common(e,t,n){var r=Cp.common(t,n);return[_p.get(e,r),r]},descendant(e,t){var n=_p.get(e,t);if(_p.isEditor(n))throw new Error("Cannot get the descendant node at path [".concat(t,"] because it refers to the root editor node instead: ").concat(Dh.stringify(n)));return n},descendants(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[n,r]of _p.nodes(e,t))0!==r.length&&(yield[n,r])}()},elements(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[n,r]of _p.nodes(e,t))_p.isElement(n)&&(yield[n,r])}()},extractProps:e=>_p.isText(e)?Op(e,Fp):Op(e,Ip),first(e,t){for(var n=t.slice(),r=_p.get(e,n);r&&!_p.isText(r)&&0!==r.children.length;)r=r.children[0],n.push(0);return[r,n]},fragment(e,t){var n={children:e.children},[r,o]=Bp.edges(t),i=_p.nodes(n,{reverse:!0,pass:e=>{var[,n]=e;return!Bp.includes(t,n)}}),a=function(){if(!Bp.includes(t,s)){var e=s[s.length-1];Rh(n,Cp.parent(s),t=>Ih(t,e,1))}Cp.equals(s,o.path)&&_h(n,s,e=>{var t=e.text.slice(0,o.offset);return Rp(Rp({},e),{},{text:t})}),Cp.equals(s,r.path)&&_h(n,s,e=>{var t=e.text.slice(r.offset);return Rp(Rp({},e),{},{text:t})})};for(var[,s]of i)a();return n.children},get(e,t){var n=_p.getIf(e,t);if(void 0===n)throw new Error("Cannot find a descendant at path [".concat(t,"] in node: ").concat(Dh.stringify(e)));return n},getIf(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(_p.isText(n)||!n.children[o])return;n=n.children[o]}return n},has(e,t){for(var n=e,r=0;r<t.length;r++){var o=t[r];if(_p.isText(n)||!n.children[o])return!1;n=n.children[o]}return!0},isAncestor:e=>!_p.isText(e),isEditor:e=>"function"==typeof e.apply,isElement:e=>Array.isArray(e.children)&&"function"!=typeof e.apply,isNode(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Nh.isText(e)||kp.isElement(e,{deep:t})||mh.isEditor(e,{deep:t})},isNodeList(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Array.isArray(e)&&e.every(e=>_p.isNode(e,{deep:t}))},isText:e=>"string"==typeof e.text,last(e,t){for(var n=t.slice(),r=_p.get(e,n);r&&!_p.isText(r)&&0!==r.children.length;){var o=r.children.length-1;r=r.children[o],n.push(o)}return[r,n]},leaf(e,t){var n=_p.get(e,t);if(!_p.isText(n))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Dh.stringify(n)));return n},levels(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function*(){for(var r of Cp.levels(t,n)){var o=_p.get(e,r);yield[o,r]}}()},matches:(e,t)=>_p.isElement(e)&&kp.isElementProps(t)&&kp.matches(e,t)||_p.isText(e)&&Nh.isTextProps(t)&&Nh.matches(e,t),nodes(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var{pass:n,reverse:r=!1}=t,{from:o=[],to:i}=t,a=new Set,s=[],u=e;!i||!(r?Cp.isBefore(s,i):Cp.isAfter(s,i));)if(a.has(u)||(yield[u,s]),a.has(u)||_p.isText(u)||0===u.children.length||null!=n&&!1!==n([u,s])){if(0===s.length)break;if(!r){var l=Cp.next(s);if(_p.has(e,l)){s=l,u=_p.get(e,s);continue}}if(r&&0!==s[s.length-1])s=Cp.previous(s),u=_p.get(e,s);else s=Cp.parent(s),u=_p.get(e,s),a.add(u)}else{a.add(u);var c=r?u.children.length-1:0;Cp.isAncestor(s,o)&&(c=o[s.length]),s=s.concat(c),u=_p.get(e,s)}}()},parent(e,t){var n=Cp.parent(t),r=_p.get(e,n);if(_p.isText(r))throw new Error("Cannot get the parent of path [".concat(t,"] because it does not exist in the root."));return r},string:e=>_p.isText(e)?e.text:e.children.map(_p.string).join(""),texts(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){for(var[n,r]of _p.nodes(e,t))_p.isText(n)&&(yield[n,r])}()}};function Lp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lp(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lp(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var jp,Hp={isNodeOperation:e=>Hp.isOperation(e)&&e.type.endsWith("_node"),isOperation(e){if(!zp(e))return!1;switch(e.type){case"insert_node":case"remove_node":return Cp.isPath(e.path)&&_p.isNode(e.node);case"insert_text":case"remove_text":return"number"==typeof e.offset&&"string"==typeof e.text&&Cp.isPath(e.path);case"merge_node":return"number"==typeof e.position&&Cp.isPath(e.path)&&zp(e.properties);case"move_node":return Cp.isPath(e.path)&&Cp.isPath(e.newPath);case"set_node":return Cp.isPath(e.path)&&zp(e.properties)&&zp(e.newProperties);case"set_selection":return null===e.properties&&Bp.isRange(e.newProperties)||null===e.newProperties&&Bp.isRange(e.properties)||zp(e.properties)&&zp(e.newProperties);case"split_node":return Cp.isPath(e.path)&&"number"==typeof e.position&&zp(e.properties);default:return!1}},isOperationList:e=>Array.isArray(e)&&e.every(e=>Hp.isOperation(e)),isSelectionOperation:e=>Hp.isOperation(e)&&e.type.endsWith("_selection"),isTextOperation:e=>Hp.isOperation(e)&&e.type.endsWith("_text"),inverse(e){switch(e.type){case"insert_node":return Mp(Mp({},e),{},{type:"remove_node"});case"insert_text":return Mp(Mp({},e),{},{type:"remove_text"});case"merge_node":return Mp(Mp({},e),{},{type:"split_node",path:Cp.previous(e.path)});case"move_node":var{newPath:t,path:n}=e;if(Cp.equals(t,n))return e;if(Cp.isSibling(n,t))return Mp(Mp({},e),{},{path:t,newPath:n});var r=Cp.transform(n,e),o=Cp.transform(Cp.next(n),e);return Mp(Mp({},e),{},{path:r,newPath:o});case"remove_node":return Mp(Mp({},e),{},{type:"insert_node"});case"remove_text":return Mp(Mp({},e),{},{type:"insert_text"});case"set_node":var{properties:i,newProperties:a}=e;return Mp(Mp({},e),{},{properties:a,newProperties:i});case"set_selection":var{properties:s,newProperties:u}=e;return Mp(Mp({},e),{},null==s?{properties:u,newProperties:null}:null==u?{properties:null,newProperties:s}:{properties:u,newProperties:s});case"split_node":return Mp(Mp({},e),{},{type:"merge_node",path:Cp.next(e.path)})}}},zp=e=>"object"==typeof e&&null!==e,$p=(e,t)=>{for(var n in e){var r=e[n],o=t[n];if(Array.isArray(r)&&Array.isArray(o)){if(r.length!==o.length)return!1;for(var i=0;i<r.length;i++)if(r[i]!==o[i])return!1}else if(zp(r)&&zp(o)){if(!$p(r,o))return!1}else if(r!==o)return!1}for(var a in t)if(void 0===e[a]&&void 0!==t[a])return!1;return!0},Up=e=>e.selection?e.selection:e.children.length>0?mh.end(e,[]):[0],Vp=(e,t)=>{var[n]=mh.node(e,t);return e=>e===n},Wp=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!t,r=t?Zp(e):e,o=jp.None,i=jp.None,a=0,s=null;for(var u of r){var l=u.codePointAt(0);if(!l)break;var c=lh(u,l);if([o,i]=n?[i,c]:[c,o],ch(o,jp.ZWJ)&&ch(i,jp.ExtPict)&&!hh(n?e.substring(0,a):e.substring(0,e.length-a)))break;if(ch(o,jp.RI)&&ch(i,jp.RI)&&!(s=null!==s?!s:!!n||vh(e.substring(0,e.length-a))))break;if(o!==jp.None&&i!==jp.None&&fh(o,i))break;a+=u.length}return a||1},Gp=/\s/,qp=/[\u002B\u0021-\u0023\u0025-\u002A\u002C-\u002F\u003A\u003B\u003F\u0040\u005B-\u005D\u005F\u007B\u007D\u00A1\u00A7\u00AB\u00B6\u00B7\u00BB\u00BF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E3B\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,Kp=/['\u2018\u2019]/,Yp=(e,t,n)=>{if(n){var r=e.length-t;return[e.slice(r,e.length),e.slice(0,r)]}return[e.slice(0,t),e.slice(t)]},Xp=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(Gp.test(t))return!1;if(Kp.test(t)){var o=Wp(n,r),[i,a]=Yp(n,o,r);if(e(i,a,r))return!0}return!qp.test(t)},Zp=function*(e){for(var t=e.length-1,n=0;n<e.length;n++){var r=e.charAt(t-n);if(Qp(r.charCodeAt(0))){var o=e.charAt(t-n-1);if(Jp(o.charCodeAt(0))){yield o+r,n++;continue}}yield r}},Jp=e=>e>=55296&&e<=56319,Qp=e=>e>=56320&&e<=57343;!function(e){e[e.None=0]="None",e[e.Extend=1]="Extend",e[e.ZWJ=2]="ZWJ",e[e.RI=4]="RI",e[e.Prepend=8]="Prepend",e[e.SpacingMark=16]="SpacingMark",e[e.L=32]="L",e[e.V=64]="V",e[e.T=128]="T",e[e.LV=256]="LV",e[e.LVT=512]="LVT",e[e.ExtPict=1024]="ExtPict",e[e.Any=2048]="Any"}(jp||(jp={}));var eh=/^(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])$/,th=/^(?:[\u0600-\u0605\u06DD\u070F\u0890\u0891\u08E2\u0D4E]|\uD804[\uDCBD\uDCCD\uDDC2\uDDC3]|\uD806[\uDD3F\uDD41\uDE3A\uDE84-\uDE89]|\uD807\uDD46)$/,nh=/^(?:[\u0903\u093B\u093E-\u0940\u0949-\u094C\u094E\u094F\u0982\u0983\u09BF\u09C0\u09C7\u09C8\u09CB\u09CC\u0A03\u0A3E-\u0A40\u0A83\u0ABE-\u0AC0\u0AC9\u0ACB\u0ACC\u0B02\u0B03\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0C01-\u0C03\u0C41-\u0C44\u0C82\u0C83\u0CBE\u0CC0\u0CC1\u0CC3\u0CC4\u0CC7\u0CC8\u0CCA\u0CCB\u0D02\u0D03\u0D3F\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D82\u0D83\u0DD0\u0DD1\u0DD8-\u0DDE\u0DF2\u0DF3\u0E33\u0EB3\u0F3E\u0F3F\u0F7F\u1031\u103B\u103C\u1056\u1057\u1084\u1715\u1734\u17B6\u17BE-\u17C5\u17C7\u17C8\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1A19\u1A1A\u1A55\u1A57\u1A6D-\u1A72\u1B04\u1B3B\u1B3D-\u1B41\u1B43\u1B44\u1B82\u1BA1\u1BA6\u1BA7\u1BAA\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1C24-\u1C2B\u1C34\u1C35\u1CE1\u1CF7\uA823\uA824\uA827\uA880\uA881\uA8B4-\uA8C3\uA952\uA953\uA983\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9C0\uAA2F\uAA30\uAA33\uAA34\uAA4D\uAAEB\uAAEE\uAAEF\uAAF5\uABE3\uABE4\uABE6\uABE7\uABE9\uABEA\uABEC]|\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB1\uDCB2\uDCB9\uDCBB\uDCBC\uDCBE\uDCC1\uDDB0\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD31-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD66\uDD6D])$/,rh=/^[\u1100-\u115F\uA960-\uA97C]$/,oh=/^[\u1160-\u11A7\uD7B0-\uD7C6]$/,ih=/^[\u11A8-\u11FF\uD7CB-\uD7FB]$/,ah=/^[\uAC00\uAC1C\uAC38\uAC54\uAC70\uAC8C\uACA8\uACC4\uACE0\uACFC\uAD18\uAD34\uAD50\uAD6C\uAD88\uADA4\uADC0\uADDC\uADF8\uAE14\uAE30\uAE4C\uAE68\uAE84\uAEA0\uAEBC\uAED8\uAEF4\uAF10\uAF2C\uAF48\uAF64\uAF80\uAF9C\uAFB8\uAFD4\uAFF0\uB00C\uB028\uB044\uB060\uB07C\uB098\uB0B4\uB0D0\uB0EC\uB108\uB124\uB140\uB15C\uB178\uB194\uB1B0\uB1CC\uB1E8\uB204\uB220\uB23C\uB258\uB274\uB290\uB2AC\uB2C8\uB2E4\uB300\uB31C\uB338\uB354\uB370\uB38C\uB3A8\uB3C4\uB3E0\uB3FC\uB418\uB434\uB450\uB46C\uB488\uB4A4\uB4C0\uB4DC\uB4F8\uB514\uB530\uB54C\uB568\uB584\uB5A0\uB5BC\uB5D8\uB5F4\uB610\uB62C\uB648\uB664\uB680\uB69C\uB6B8\uB6D4\uB6F0\uB70C\uB728\uB744\uB760\uB77C\uB798\uB7B4\uB7D0\uB7EC\uB808\uB824\uB840\uB85C\uB878\uB894\uB8B0\uB8CC\uB8E8\uB904\uB920\uB93C\uB958\uB974\uB990\uB9AC\uB9C8\uB9E4\uBA00\uBA1C\uBA38\uBA54\uBA70\uBA8C\uBAA8\uBAC4\uBAE0\uBAFC\uBB18\uBB34\uBB50\uBB6C\uBB88\uBBA4\uBBC0\uBBDC\uBBF8\uBC14\uBC30\uBC4C\uBC68\uBC84\uBCA0\uBCBC\uBCD8\uBCF4\uBD10\uBD2C\uBD48\uBD64\uBD80\uBD9C\uBDB8\uBDD4\uBDF0\uBE0C\uBE28\uBE44\uBE60\uBE7C\uBE98\uBEB4\uBED0\uBEEC\uBF08\uBF24\uBF40\uBF5C\uBF78\uBF94\uBFB0\uBFCC\uBFE8\uC004\uC020\uC03C\uC058\uC074\uC090\uC0AC\uC0C8\uC0E4\uC100\uC11C\uC138\uC154\uC170\uC18C\uC1A8\uC1C4\uC1E0\uC1FC\uC218\uC234\uC250\uC26C\uC288\uC2A4\uC2C0\uC2DC\uC2F8\uC314\uC330\uC34C\uC368\uC384\uC3A0\uC3BC\uC3D8\uC3F4\uC410\uC42C\uC448\uC464\uC480\uC49C\uC4B8\uC4D4\uC4F0\uC50C\uC528\uC544\uC560\uC57C\uC598\uC5B4\uC5D0\uC5EC\uC608\uC624\uC640\uC65C\uC678\uC694\uC6B0\uC6CC\uC6E8\uC704\uC720\uC73C\uC758\uC774\uC790\uC7AC\uC7C8\uC7E4\uC800\uC81C\uC838\uC854\uC870\uC88C\uC8A8\uC8C4\uC8E0\uC8FC\uC918\uC934\uC950\uC96C\uC988\uC9A4\uC9C0\uC9DC\uC9F8\uCA14\uCA30\uCA4C\uCA68\uCA84\uCAA0\uCABC\uCAD8\uCAF4\uCB10\uCB2C\uCB48\uCB64\uCB80\uCB9C\uCBB8\uCBD4\uCBF0\uCC0C\uCC28\uCC44\uCC60\uCC7C\uCC98\uCCB4\uCCD0\uCCEC\uCD08\uCD24\uCD40\uCD5C\uCD78\uCD94\uCDB0\uCDCC\uCDE8\uCE04\uCE20\uCE3C\uCE58\uCE74\uCE90\uCEAC\uCEC8\uCEE4\uCF00\uCF1C\uCF38\uCF54\uCF70\uCF8C\uCFA8\uCFC4\uCFE0\uCFFC\uD018\uD034\uD050\uD06C\uD088\uD0A4\uD0C0\uD0DC\uD0F8\uD114\uD130\uD14C\uD168\uD184\uD1A0\uD1BC\uD1D8\uD1F4\uD210\uD22C\uD248\uD264\uD280\uD29C\uD2B8\uD2D4\uD2F0\uD30C\uD328\uD344\uD360\uD37C\uD398\uD3B4\uD3D0\uD3EC\uD408\uD424\uD440\uD45C\uD478\uD494\uD4B0\uD4CC\uD4E8\uD504\uD520\uD53C\uD558\uD574\uD590\uD5AC\uD5C8\uD5E4\uD600\uD61C\uD638\uD654\uD670\uD68C\uD6A8\uD6C4\uD6E0\uD6FC\uD718\uD734\uD750\uD76C\uD788]$/,sh=/^[\uAC01-\uAC1B\uAC1D-\uAC37\uAC39-\uAC53\uAC55-\uAC6F\uAC71-\uAC8B\uAC8D-\uACA7\uACA9-\uACC3\uACC5-\uACDF\uACE1-\uACFB\uACFD-\uAD17\uAD19-\uAD33\uAD35-\uAD4F\uAD51-\uAD6B\uAD6D-\uAD87\uAD89-\uADA3\uADA5-\uADBF\uADC1-\uADDB\uADDD-\uADF7\uADF9-\uAE13\uAE15-\uAE2F\uAE31-\uAE4B\uAE4D-\uAE67\uAE69-\uAE83\uAE85-\uAE9F\uAEA1-\uAEBB\uAEBD-\uAED7\uAED9-\uAEF3\uAEF5-\uAF0F\uAF11-\uAF2B\uAF2D-\uAF47\uAF49-\uAF63\uAF65-\uAF7F\uAF81-\uAF9B\uAF9D-\uAFB7\uAFB9-\uAFD3\uAFD5-\uAFEF\uAFF1-\uB00B\uB00D-\uB027\uB029-\uB043\uB045-\uB05F\uB061-\uB07B\uB07D-\uB097\uB099-\uB0B3\uB0B5-\uB0CF\uB0D1-\uB0EB\uB0ED-\uB107\uB109-\uB123\uB125-\uB13F\uB141-\uB15B\uB15D-\uB177\uB179-\uB193\uB195-\uB1AF\uB1B1-\uB1CB\uB1CD-\uB1E7\uB1E9-\uB203\uB205-\uB21F\uB221-\uB23B\uB23D-\uB257\uB259-\uB273\uB275-\uB28F\uB291-\uB2AB\uB2AD-\uB2C7\uB2C9-\uB2E3\uB2E5-\uB2FF\uB301-\uB31B\uB31D-\uB337\uB339-\uB353\uB355-\uB36F\uB371-\uB38B\uB38D-\uB3A7\uB3A9-\uB3C3\uB3C5-\uB3DF\uB3E1-\uB3FB\uB3FD-\uB417\uB419-\uB433\uB435-\uB44F\uB451-\uB46B\uB46D-\uB487\uB489-\uB4A3\uB4A5-\uB4BF\uB4C1-\uB4DB\uB4DD-\uB4F7\uB4F9-\uB513\uB515-\uB52F\uB531-\uB54B\uB54D-\uB567\uB569-\uB583\uB585-\uB59F\uB5A1-\uB5BB\uB5BD-\uB5D7\uB5D9-\uB5F3\uB5F5-\uB60F\uB611-\uB62B\uB62D-\uB647\uB649-\uB663\uB665-\uB67F\uB681-\uB69B\uB69D-\uB6B7\uB6B9-\uB6D3\uB6D5-\uB6EF\uB6F1-\uB70B\uB70D-\uB727\uB729-\uB743\uB745-\uB75F\uB761-\uB77B\uB77D-\uB797\uB799-\uB7B3\uB7B5-\uB7CF\uB7D1-\uB7EB\uB7ED-\uB807\uB809-\uB823\uB825-\uB83F\uB841-\uB85B\uB85D-\uB877\uB879-\uB893\uB895-\uB8AF\uB8B1-\uB8CB\uB8CD-\uB8E7\uB8E9-\uB903\uB905-\uB91F\uB921-\uB93B\uB93D-\uB957\uB959-\uB973\uB975-\uB98F\uB991-\uB9AB\uB9AD-\uB9C7\uB9C9-\uB9E3\uB9E5-\uB9FF\uBA01-\uBA1B\uBA1D-\uBA37\uBA39-\uBA53\uBA55-\uBA6F\uBA71-\uBA8B\uBA8D-\uBAA7\uBAA9-\uBAC3\uBAC5-\uBADF\uBAE1-\uBAFB\uBAFD-\uBB17\uBB19-\uBB33\uBB35-\uBB4F\uBB51-\uBB6B\uBB6D-\uBB87\uBB89-\uBBA3\uBBA5-\uBBBF\uBBC1-\uBBDB\uBBDD-\uBBF7\uBBF9-\uBC13\uBC15-\uBC2F\uBC31-\uBC4B\uBC4D-\uBC67\uBC69-\uBC83\uBC85-\uBC9F\uBCA1-\uBCBB\uBCBD-\uBCD7\uBCD9-\uBCF3\uBCF5-\uBD0F\uBD11-\uBD2B\uBD2D-\uBD47\uBD49-\uBD63\uBD65-\uBD7F\uBD81-\uBD9B\uBD9D-\uBDB7\uBDB9-\uBDD3\uBDD5-\uBDEF\uBDF1-\uBE0B\uBE0D-\uBE27\uBE29-\uBE43\uBE45-\uBE5F\uBE61-\uBE7B\uBE7D-\uBE97\uBE99-\uBEB3\uBEB5-\uBECF\uBED1-\uBEEB\uBEED-\uBF07\uBF09-\uBF23\uBF25-\uBF3F\uBF41-\uBF5B\uBF5D-\uBF77\uBF79-\uBF93\uBF95-\uBFAF\uBFB1-\uBFCB\uBFCD-\uBFE7\uBFE9-\uC003\uC005-\uC01F\uC021-\uC03B\uC03D-\uC057\uC059-\uC073\uC075-\uC08F\uC091-\uC0AB\uC0AD-\uC0C7\uC0C9-\uC0E3\uC0E5-\uC0FF\uC101-\uC11B\uC11D-\uC137\uC139-\uC153\uC155-\uC16F\uC171-\uC18B\uC18D-\uC1A7\uC1A9-\uC1C3\uC1C5-\uC1DF\uC1E1-\uC1FB\uC1FD-\uC217\uC219-\uC233\uC235-\uC24F\uC251-\uC26B\uC26D-\uC287\uC289-\uC2A3\uC2A5-\uC2BF\uC2C1-\uC2DB\uC2DD-\uC2F7\uC2F9-\uC313\uC315-\uC32F\uC331-\uC34B\uC34D-\uC367\uC369-\uC383\uC385-\uC39F\uC3A1-\uC3BB\uC3BD-\uC3D7\uC3D9-\uC3F3\uC3F5-\uC40F\uC411-\uC42B\uC42D-\uC447\uC449-\uC463\uC465-\uC47F\uC481-\uC49B\uC49D-\uC4B7\uC4B9-\uC4D3\uC4D5-\uC4EF\uC4F1-\uC50B\uC50D-\uC527\uC529-\uC543\uC545-\uC55F\uC561-\uC57B\uC57D-\uC597\uC599-\uC5B3\uC5B5-\uC5CF\uC5D1-\uC5EB\uC5ED-\uC607\uC609-\uC623\uC625-\uC63F\uC641-\uC65B\uC65D-\uC677\uC679-\uC693\uC695-\uC6AF\uC6B1-\uC6CB\uC6CD-\uC6E7\uC6E9-\uC703\uC705-\uC71F\uC721-\uC73B\uC73D-\uC757\uC759-\uC773\uC775-\uC78F\uC791-\uC7AB\uC7AD-\uC7C7\uC7C9-\uC7E3\uC7E5-\uC7FF\uC801-\uC81B\uC81D-\uC837\uC839-\uC853\uC855-\uC86F\uC871-\uC88B\uC88D-\uC8A7\uC8A9-\uC8C3\uC8C5-\uC8DF\uC8E1-\uC8FB\uC8FD-\uC917\uC919-\uC933\uC935-\uC94F\uC951-\uC96B\uC96D-\uC987\uC989-\uC9A3\uC9A5-\uC9BF\uC9C1-\uC9DB\uC9DD-\uC9F7\uC9F9-\uCA13\uCA15-\uCA2F\uCA31-\uCA4B\uCA4D-\uCA67\uCA69-\uCA83\uCA85-\uCA9F\uCAA1-\uCABB\uCABD-\uCAD7\uCAD9-\uCAF3\uCAF5-\uCB0F\uCB11-\uCB2B\uCB2D-\uCB47\uCB49-\uCB63\uCB65-\uCB7F\uCB81-\uCB9B\uCB9D-\uCBB7\uCBB9-\uCBD3\uCBD5-\uCBEF\uCBF1-\uCC0B\uCC0D-\uCC27\uCC29-\uCC43\uCC45-\uCC5F\uCC61-\uCC7B\uCC7D-\uCC97\uCC99-\uCCB3\uCCB5-\uCCCF\uCCD1-\uCCEB\uCCED-\uCD07\uCD09-\uCD23\uCD25-\uCD3F\uCD41-\uCD5B\uCD5D-\uCD77\uCD79-\uCD93\uCD95-\uCDAF\uCDB1-\uCDCB\uCDCD-\uCDE7\uCDE9-\uCE03\uCE05-\uCE1F\uCE21-\uCE3B\uCE3D-\uCE57\uCE59-\uCE73\uCE75-\uCE8F\uCE91-\uCEAB\uCEAD-\uCEC7\uCEC9-\uCEE3\uCEE5-\uCEFF\uCF01-\uCF1B\uCF1D-\uCF37\uCF39-\uCF53\uCF55-\uCF6F\uCF71-\uCF8B\uCF8D-\uCFA7\uCFA9-\uCFC3\uCFC5-\uCFDF\uCFE1-\uCFFB\uCFFD-\uD017\uD019-\uD033\uD035-\uD04F\uD051-\uD06B\uD06D-\uD087\uD089-\uD0A3\uD0A5-\uD0BF\uD0C1-\uD0DB\uD0DD-\uD0F7\uD0F9-\uD113\uD115-\uD12F\uD131-\uD14B\uD14D-\uD167\uD169-\uD183\uD185-\uD19F\uD1A1-\uD1BB\uD1BD-\uD1D7\uD1D9-\uD1F3\uD1F5-\uD20F\uD211-\uD22B\uD22D-\uD247\uD249-\uD263\uD265-\uD27F\uD281-\uD29B\uD29D-\uD2B7\uD2B9-\uD2D3\uD2D5-\uD2EF\uD2F1-\uD30B\uD30D-\uD327\uD329-\uD343\uD345-\uD35F\uD361-\uD37B\uD37D-\uD397\uD399-\uD3B3\uD3B5-\uD3CF\uD3D1-\uD3EB\uD3ED-\uD407\uD409-\uD423\uD425-\uD43F\uD441-\uD45B\uD45D-\uD477\uD479-\uD493\uD495-\uD4AF\uD4B1-\uD4CB\uD4CD-\uD4E7\uD4E9-\uD503\uD505-\uD51F\uD521-\uD53B\uD53D-\uD557\uD559-\uD573\uD575-\uD58F\uD591-\uD5AB\uD5AD-\uD5C7\uD5C9-\uD5E3\uD5E5-\uD5FF\uD601-\uD61B\uD61D-\uD637\uD639-\uD653\uD655-\uD66F\uD671-\uD68B\uD68D-\uD6A7\uD6A9-\uD6C3\uD6C5-\uD6DF\uD6E1-\uD6FB\uD6FD-\uD717\uD719-\uD733\uD735-\uD74F\uD751-\uD76B\uD76D-\uD787\uD789-\uD7A3]$/,uh=/^(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])$/,lh=(e,t)=>{var n=jp.Any;return-1!==e.search(eh)&&(n|=jp.Extend),8205===t&&(n|=jp.ZWJ),t>=127462&&t<=127487&&(n|=jp.RI),-1!==e.search(th)&&(n|=jp.Prepend),-1!==e.search(nh)&&(n|=jp.SpacingMark),-1!==e.search(rh)&&(n|=jp.L),-1!==e.search(oh)&&(n|=jp.V),-1!==e.search(ih)&&(n|=jp.T),-1!==e.search(ah)&&(n|=jp.LV),-1!==e.search(sh)&&(n|=jp.LVT),-1!==e.search(uh)&&(n|=jp.ExtPict),n};function ch(e,t){return 0!==(e&t)}var dh=[[jp.L,jp.L|jp.V|jp.LV|jp.LVT],[jp.LV|jp.V,jp.V|jp.T],[jp.LVT|jp.T,jp.T],[jp.Any,jp.Extend|jp.ZWJ],[jp.Any,jp.SpacingMark],[jp.Prepend,jp.Any],[jp.ZWJ,jp.ExtPict],[jp.RI,jp.RI]];function fh(e,t){return-1===dh.findIndex(n=>ch(e,n[0])&&ch(t,n[1]))}var ph=/(?:[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u2388\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2605\u2607-\u2612\u2614-\u2685\u2690-\u2705\u2708-\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763-\u2767\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDD0F\uDD2F\uDD6C-\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDAD-\uDDE5\uDE01-\uDE0F\uDE1A\uDE2F\uDE32-\uDE3A\uDE3C-\uDE3F\uDE49-\uDFFA]|\uD83D[\uDC00-\uDD3D\uDD46-\uDE4F\uDE80-\uDEFF\uDF74-\uDF7F\uDFD5-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE-\uDCFF\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDEFF]|\uD83F[\uDC00-\uDFFD])(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09BE\u09C1-\u09C4\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3E\u0B3F\u0B41-\u0B44\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE\u0BC0\u0BCD\u0BD7\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC2\u0CC6\u0CCC\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D3E\u0D41-\u0D44\u0D4D\u0D57\u0D62\u0D63\u0D81\u0DCA\u0DCF\u0DD2-\u0DD4\u0DD6\u0DDF\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u200C\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFF9E\uFF9F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDEFD-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDE41\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF3E\uDF40\uDF57\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB0\uDCB3-\uDCB8\uDCBA\uDCBD\uDCBF\uDCC0\uDCC2\uDCC3\uDDAF\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD30\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4\uDF00\uDF01\uDF36-\uDF3A\uDF40\uDF42]|\uD80D[\uDC40\uDC47-\uDC55]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65\uDD67-\uDD69\uDD6E-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uD83C[\uDFFB-\uDFFF]|\uDB40[\uDC20-\uDC7F\uDD00-\uDDEF])*\u200D$/,hh=e=>-1!==e.search(ph),gh=/(?:\uD83C[\uDDE6-\uDDFF])+$/g,vh=e=>{var t=e.match(gh);return null!==t&&t[0].length/2%2==1},mh={above:(e,t)=>e.above(t),addMark(e,t,n){e.addMark(t,n)},after:(e,t,n)=>e.after(t,n),before:(e,t,n)=>e.before(t,n),deleteBackward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:n="character"}=t;e.deleteBackward(n)},deleteForward(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{unit:n="character"}=t;e.deleteForward(n)},deleteFragment(e,t){e.deleteFragment(t)},edges:(e,t)=>e.edges(t),elementReadOnly(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.elementReadOnly(t)},end:(e,t)=>e.end(t),first:(e,t)=>e.first(t),fragment:(e,t)=>e.fragment(t),hasBlocks:(e,t)=>e.hasBlocks(t),hasInlines:(e,t)=>e.hasInlines(t),hasPath:(e,t)=>e.hasPath(t),hasTexts:(e,t)=>e.hasTexts(t),insertBreak(e){e.insertBreak()},insertFragment(e,t,n){e.insertFragment(t,n)},insertNode(e,t){e.insertNode(t)},insertSoftBreak(e){e.insertSoftBreak()},insertText(e,t){e.insertText(t)},isBlock:(e,t)=>e.isBlock(t),isEdge:(e,t,n)=>e.isEdge(t,n),isEditor:function(e){var{deep:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!zp(e))return!1;var n="function"==typeof e.above&&"function"==typeof e.addMark&&"function"==typeof e.after&&"function"==typeof e.apply&&"function"==typeof e.before&&"function"==typeof e.collapse&&"function"==typeof e.delete&&"function"==typeof e.deleteBackward&&"function"==typeof e.deleteForward&&"function"==typeof e.deleteFragment&&"function"==typeof e.deselect&&"function"==typeof e.edges&&"function"==typeof e.elementReadOnly&&"function"==typeof e.end&&"function"==typeof e.first&&"function"==typeof e.fragment&&"function"==typeof e.getDirtyPaths&&"function"==typeof e.getFragment&&"function"==typeof e.getMarks&&"function"==typeof e.hasBlocks&&"function"==typeof e.hasInlines&&"function"==typeof e.hasPath&&"function"==typeof e.hasTexts&&"function"==typeof e.insertBreak&&"function"==typeof e.insertFragment&&"function"==typeof e.insertNode&&"function"==typeof e.insertNodes&&"function"==typeof e.insertSoftBreak&&"function"==typeof e.insertText&&"function"==typeof e.isBlock&&"function"==typeof e.isEdge&&"function"==typeof e.isElementReadOnly&&"function"==typeof e.isEmpty&&"function"==typeof e.isEnd&&"function"==typeof e.isInline&&"function"==typeof e.isNormalizing&&"function"==typeof e.isSelectable&&"function"==typeof e.isStart&&"function"==typeof e.isVoid&&"function"==typeof e.last&&"function"==typeof e.leaf&&"function"==typeof e.levels&&"function"==typeof e.liftNodes&&"function"==typeof e.markableVoid&&"function"==typeof e.mergeNodes&&"function"==typeof e.move&&"function"==typeof e.moveNodes&&"function"==typeof e.next&&"function"==typeof e.node&&"function"==typeof e.nodes&&"function"==typeof e.normalize&&"function"==typeof e.normalizeNode&&"function"==typeof e.onChange&&"function"==typeof e.parent&&"function"==typeof e.path&&"function"==typeof e.pathRef&&"function"==typeof e.pathRefs&&"function"==typeof e.point&&"function"==typeof e.pointRef&&"function"==typeof e.pointRefs&&"function"==typeof e.positions&&"function"==typeof e.previous&&"function"==typeof e.range&&"function"==typeof e.rangeRef&&"function"==typeof e.rangeRefs&&"function"==typeof e.removeMark&&"function"==typeof e.removeNodes&&"function"==typeof e.select&&"function"==typeof e.setNodes&&"function"==typeof e.setNormalizing&&"function"==typeof e.setPoint&&"function"==typeof e.setSelection&&"function"==typeof e.shouldMergeNodesRemovePrevNode&&"function"==typeof e.shouldNormalize&&"function"==typeof e.splitNodes&&"function"==typeof e.start&&"function"==typeof e.string&&"function"==typeof e.unhangRange&&"function"==typeof e.unsetNodes&&"function"==typeof e.unwrapNodes&&"function"==typeof e.void&&"function"==typeof e.withoutNormalizing&&"function"==typeof e.wrapNodes&&(null===e.marks||zp(e.marks))&&(null===e.selection||Bp.isRange(e.selection))&&(t?_p.isNodeList(e.children)&&Hp.isOperationList(e.operations):Array.isArray(e.children)&&Array.isArray(e.operations));return n},isElementReadOnly:(e,t)=>e.isElementReadOnly(t),isEmpty:(e,t)=>e.isEmpty(t),isEnd:(e,t,n)=>e.isEnd(t,n),isInline:(e,t)=>e.isInline(t),isNormalizing:e=>e.isNormalizing(),isSelectable:(e,t)=>e.isSelectable(t),isStart:(e,t,n)=>e.isStart(t,n),isVoid:(e,t)=>e.isVoid(t),last:(e,t)=>e.last(t),leaf:(e,t,n)=>e.leaf(t,n),levels:(e,t)=>e.levels(t),marks:e=>e.getMarks(),next:(e,t)=>e.next(t),node:(e,t,n)=>e.node(t,n),nodes:(e,t)=>e.nodes(t),normalize(e,t){e.normalize(t)},parent:(e,t,n)=>e.parent(t,n),path:(e,t,n)=>e.path(t,n),pathRef:(e,t,n)=>e.pathRef(t,n),pathRefs:e=>e.pathRefs(),point:(e,t,n)=>e.point(t,n),pointRef:(e,t,n)=>e.pointRef(t,n),pointRefs:e=>e.pointRefs(),positions:(e,t)=>e.positions(t),previous:(e,t)=>e.previous(t),range:(e,t,n)=>e.range(t,n),rangeRef:(e,t,n)=>e.rangeRef(t,n),rangeRefs:e=>e.rangeRefs(),removeMark(e,t){e.removeMark(t)},setNormalizing(e,t){e.setNormalizing(t)},start:(e,t)=>e.start(t),string:(e,t,n)=>e.string(t,n),unhangRange:(e,t,n)=>e.unhangRange(t,n),void:(e,t)=>e.void(t),withoutNormalizing(e,t){e.withoutNormalizing(t)},shouldMergeNodesRemovePrevNode:(e,t,n)=>e.shouldMergeNodesRemovePrevNode(t,n)},yh={isLocation:e=>Cp.isPath(e)||wh.isPoint(e)||Bp.isRange(e),isPath:e=>Array.isArray(e),isPoint:e=>"offset"in e,isRange:e=>"anchor"in e,isSpan:e=>Array.isArray(e)&&Array.isArray(e[0])};function bh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Eh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bh(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var wh={compare(e,t){var n=Cp.compare(e.path,t.path);return 0===n?e.offset<t.offset?-1:e.offset>t.offset?1:0:n},isAfter:(e,t)=>1===wh.compare(e,t),isBefore:(e,t)=>-1===wh.compare(e,t),equals:(e,t)=>e.offset===t.offset&&Cp.equals(e.path,t.path),isPoint:e=>zp(e)&&"number"==typeof e.offset&&Cp.isPath(e.path),transform(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null===e)return null;var{affinity:r="forward"}=n,{path:o,offset:i}=e;switch(t.type){case"insert_node":case"move_node":o=Cp.transform(o,t,n);break;case"insert_text":Cp.equals(t.path,o)&&(t.offset<i||t.offset===i&&"forward"===r)&&(i+=t.text.length);break;case"merge_node":Cp.equals(t.path,o)&&(i+=t.position),o=Cp.transform(o,t,n);break;case"remove_text":Cp.equals(t.path,o)&&t.offset<=i&&(i-=Math.min(i-t.offset,t.text.length));break;case"remove_node":if(Cp.equals(t.path,o)||Cp.isAncestor(t.path,o))return null;o=Cp.transform(o,t,n);break;case"split_node":if(Cp.equals(t.path,o)){if(t.position===i&&null==r)return null;(t.position<i||t.position===i&&"forward"===r)&&(i-=t.position,o=Cp.transform(o,t,Eh(Eh({},n),{},{affinity:"forward"})))}else o=Cp.transform(o,t,n);break;default:return e}return{path:o,offset:i}}},Ch=void 0,Dh={setScrubber(e){Ch=e},stringify:e=>JSON.stringify(e,Ch)},Ah=["text"],Sh=["anchor","focus","merge"];function Oh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function xh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oh(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Nh={equals(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{loose:r=!1}=n;function o(e){return Op(e,Ah)}return $p(r?o(e):e,r?o(t):t)},isText:e=>zp(e)&&"string"==typeof e.text,isTextList:e=>Array.isArray(e)&&e.every(e=>Nh.isText(e)),isTextProps:e=>void 0!==e.text,matches(e,t){for(var n in t)if("text"!==n&&(!e.hasOwnProperty(n)||e[n]!==t[n]))return!1;return!0},decorations(e,t){var n=[{leaf:xh({},e)}];for(var r of t){var{anchor:o,focus:i,merge:a}=r,s=Op(r,Sh),[u,l]=Bp.edges(r),c=[],d=0,f=u.offset,p=l.offset,h=null!=a?a:Object.assign;for(var{leaf:g}of n){var{length:v}=g.text,m=d;if(d+=v,f<=m&&d<=p)h(g,s),c.push({leaf:g});else if(f!==p&&(f===d||p===m)||f>d||p<m||p===m&&0!==m)c.push({leaf:g});else{var y=g,b=void 0,E=void 0;if(p<d){var w=p-m;E={leaf:xh(xh({},y),{},{text:y.text.slice(w)})},y=xh(xh({},y),{},{text:y.text.slice(0,w)})}if(f>m){var C=f-m;b={leaf:xh(xh({},y),{},{text:y.text.slice(0,C)})},y=xh(xh({},y),{},{text:y.text.slice(C)})}h(y,s),b&&c.push(b),c.push({leaf:y}),E&&c.push(E)}}n=c}if(n.length>1){var D=0;for(var[A,S]of n.entries()){var O=D,x=O+S.leaf.text.length,N={start:O,end:x};0===A&&(N.isFirst=!0),A===n.length-1&&(N.isLast=!0),S.position=N,D=x}}return n}};function Bh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Th(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bh(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var kh=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return[...e.slice(0,t),...r,...e.slice(t)]},Fh=function(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];return[...e.slice(0,t),...o,...e.slice(t+n)]},Ih=Fh,Ph=(e,t,n)=>{if(0===t.length)throw new Error("Cannot modify the editor");for(var r=_p.get(e,t),o=t.slice(),i=n(r);o.length>1;){var a=o.pop(),s=_p.get(e,o);i=Th(Th({},s),{},{children:Fh(s.children,a,1,i)})}var u=o.pop();e.children=Fh(e.children,u,1,i)},Rh=(e,t,n)=>{0===t.length?e.children=n(e.children):Ph(e,t,e=>{if(_p.isText(e))throw new Error("Cannot get the element at path [".concat(t,"] because it refers to a leaf node: ").concat(Dh.stringify(e)));return Th(Th({},e),{},{children:n(e.children)})})},_h=(e,t,n)=>Ph(e,t,e=>{if(!_p.isText(e))throw new Error("Cannot get the leaf node at path [".concat(t,"] because it refers to a non-leaf node: ").concat(Dh.stringify(e)));return n(e)});function Lh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Mh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lh(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var jh={transform(e,t){var n=!1;switch(t.type){case"insert_node":var{path:r,node:o}=t;Rh(e,Cp.parent(r),e=>{var t=r[r.length-1];if(t>e.length)throw new Error('Cannot apply an "insert_node" operation at path ['.concat(r,"] because the destination is past the end of the node."));return kh(e,t,o)}),n=!0;break;case"insert_text":var{path:i,offset:a,text:s}=t;if(0===s.length)break;_h(e,i,e=>{var t=e.text.slice(0,a),n=e.text.slice(a);return Mh(Mh({},e),{},{text:t+s+n})}),n=!0;break;case"merge_node":var{path:u}=t,l=u[u.length-1],c=Cp.previous(u),d=c[c.length-1];Rh(e,Cp.parent(u),e=>{var t,n=e[l],r=e[d];if(_p.isText(n)&&_p.isText(r))t=Mh(Mh({},r),{},{text:r.text+n.text});else{if(!_p.isElement(n)||!_p.isElement(r))throw new Error('Cannot apply a "merge_node" operation at path ['.concat(u,"] to nodes of different interfaces: ").concat(Dh.stringify(n)," ").concat(Dh.stringify(r)));t=Mh(Mh({},r),{},{children:r.children.concat(n.children)})}return Fh(e,d,2,t)}),n=!0;break;case"move_node":var{path:f,newPath:p}=t,h=f[f.length-1];if(Cp.isAncestor(f,p))throw new Error("Cannot move a path [".concat(f,"] to new path [").concat(p,"] because the destination is inside itself."));var g=_p.get(e,f);Rh(e,Cp.parent(f),e=>Ih(e,h,1));var v=Cp.transform(f,t),m=v[v.length-1];Rh(e,Cp.parent(v),e=>kh(e,m,g)),n=!0;break;case"remove_node":var{path:y}=t,b=y[y.length-1];if(Rh(e,Cp.parent(y),e=>Ih(e,b,1)),e.selection){var E=Mh({},e.selection);for(var[w,C]of Bp.points(E)){var D=wh.transform(w,t);if(null!=E&&null!=D)E[C]=D;else{var A=void 0,S=void 0;for(var[O,x]of _p.texts(e)){if(-1!==Cp.compare(x,y)){S=[O,x];break}A=[O,x]}var N=!1;A&&S&&(N=!Cp.isSibling(A[1],y)&&(!!Cp.equals(S[1],y)||Cp.common(A[1],y).length<Cp.common(S[1],y).length)),A&&!N?E[C]={path:A[1],offset:A[0].text.length}:S?E[C]={path:S[1],offset:0}:E=null}}E&&Bp.equals(E,e.selection)||(e.selection=E)}break;case"remove_text":var{path:B,offset:T,text:k}=t;if(0===k.length)break;_h(e,B,e=>{var t=e.text.slice(0,T),n=e.text.slice(T+k.length);return Mh(Mh({},e),{},{text:t+n})}),n=!0;break;case"set_node":var{path:F,properties:I,newProperties:P}=t;if(0===F.length)throw new Error("Cannot set properties on the root node!");Ph(e,F,e=>{var t=Mh({},e);for(var n in P){if("children"===n||"text"===n)throw new Error('Cannot set the "'.concat(n,'" property of nodes!'));var r=P[n];null==r?delete t[n]:t[n]=r}for(var o in I)P.hasOwnProperty(o)||delete t[o];return t});break;case"set_selection":var{newProperties:R}=t;if(null==R){e.selection=null;break}if(null==e.selection){if(!R.anchor||!R.focus)throw new Error('Cannot apply an incomplete "set_selection" operation properties '.concat(Dh.stringify(R)," when there is no current selection."));e.selection=Mh({},R);break}var _=Mh({},e.selection);for(var L in R){var M=R[L];if(null==M){if("anchor"===L||"focus"===L)throw new Error('Cannot remove the "'.concat(L,'" selection property'));delete _[L]}else _[L]=M}e.selection=_;break;case"split_node":var{path:j,position:H,properties:z}=t,$=j[j.length-1];if(0===j.length)throw new Error('Cannot apply a "split_node" operation at path ['.concat(j,"] because the root node cannot be split."));Rh(e,Cp.parent(j),e=>{var t,n,r=e[$];if(_p.isText(r)){var o=r.text.slice(0,H),i=r.text.slice(H);t=Mh(Mh({},r),{},{text:o}),n=Mh(Mh({},z),{},{text:i})}else{var a=r.children.slice(0,H),s=r.children.slice(H);t=Mh(Mh({},r),{},{children:a}),n=Mh(Mh({},z),{},{children:s})}return Fh(e,$,1,t,n)}),n=!0}if(n&&e.selection){var U=Mh({},e.selection);for(var[V,W]of Bp.points(U))U[W]=wh.transform(V,t);Bp.equals(U,e.selection)||(e.selection=U)}}},Hh={insertNodes(e,t,n){e.insertNodes(t,n)},liftNodes(e,t){e.liftNodes(t)},mergeNodes(e,t){e.mergeNodes(t)},moveNodes(e,t){e.moveNodes(t)},removeNodes(e,t){e.removeNodes(t)},setNodes(e,t,n){e.setNodes(t,n)},splitNodes(e,t){e.splitNodes(t)},unsetNodes(e,t,n){e.unsetNodes(t,n)},unwrapNodes(e,t){e.unwrapNodes(t)},wrapNodes(e,t,n){e.wrapNodes(t,n)}},zh={collapse(e,t){e.collapse(t)},deselect(e){e.deselect()},move(e,t){e.move(t)},select(e,t){e.select(t)},setPoint(e,t,n){e.setPoint(t,n)},setSelection(e,t){e.setSelection(t)}},$h={delete(e,t){e.delete(t)},insertFragment(e,t,n){e.insertFragment(t,n)},insertText(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};mh.withoutNormalizing(e,()=>{var{voids:r=!1}=n,{at:o=Up(e)}=n;if(yh.isPath(o)&&(o=mh.range(e,o)),yh.isRange(o))if(Bp.isCollapsed(o))o=o.anchor;else{var i=Bp.end(o);if(!r&&mh.void(e,{at:i}))return;var a=Bp.start(o),s=mh.pointRef(e,a),u=mh.pointRef(e,i);Wh.delete(e,{at:o,voids:r});var l=s.unref(),c=u.unref();o=l||c,Wh.setSelection(e,{anchor:o,focus:o})}if(!(!r&&mh.void(e,{at:o})||mh.elementReadOnly(e,{at:o}))){var{path:d,offset:f}=o;t.length>0&&e.apply({type:"insert_text",path:d,offset:f,text:t})}})}};function Uh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Vh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uh(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Wh=Vh(Vh(Vh(Vh({},jh),Hh),zh),$h),Gh=new WeakMap;function qh(e,t,n){var r,o,i=gp.get(e)||[],a=vp.get(e)||new Set,s=e=>{if(e){var t=e.join(",");o.has(t)||(o.add(t),r.push(e))}};if(n)for(var u of(r=[],o=new Set,i)){s(n(u))}else r=i,o=a;for(var l of t)s(l);gp.set(e,r),vp.set(e,o)}var Kh=(e,t)=>{for(var n of mh.pathRefs(e))fp.transform(n,t);for(var r of mh.pointRefs(e))pp.transform(r,t);for(var o of mh.rangeRefs(e))hp.transform(o,t);if(!(e=>Gh.get(e)||!1)(e)){var i=Cp.operationCanTransformPath(t)?e=>Cp.transform(e,t):void 0;qh(e,e.getDirtyPaths(t),i)}Wh.transform(e,t),e.operations.push(t),mh.normalize(e,{operation:t}),"set_selection"===t.type&&(e.marks=null),mp.get(e)||(mp.set(e,!0),Promise.resolve().then(()=>{mp.set(e,!1),e.onChange({operation:t}),e.operations=[]}))};function Yh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Xh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yh(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Zh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Jh(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zh(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Qh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function eg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qh(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qh(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function tg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ng(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?tg(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function rg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function og(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rg(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function ig(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var ag=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{selection:r,marks:o}=e;if(r){if(o){var i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ig(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ig(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({text:t},o);Wh.insertNodes(e,i,{at:n.at,voids:n.voids})}else Wh.insertText(e,t,n);e.marks=null}};var sg=["text"],ug=["text"];var lg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{force:n=!1,operation:r}=t,o=e=>gp.get(e)||[],i=e=>{var t=o(e).pop(),n=t.join(",");return(e=>vp.get(e)||new Set)(e).delete(n),t};if(mh.isNormalizing(e)){if(n){var a=Array.from(_p.nodes(e),e=>{var[,t]=e;return t}),s=new Set(a.map(e=>e.join(",")));gp.set(e,a),vp.set(e,s)}0!==o(e).length&&mh.withoutNormalizing(e,()=>{for(var t of o(e))if(_p.has(e,t)){var n=mh.node(e,t),[a,s]=n;_p.isElement(a)&&0===a.children.length&&e.normalizeNode(n,{operation:r})}for(var u=o(e),l=u.length,c=0;0!==u.length;){if(!e.shouldNormalize({dirtyPaths:u,iteration:c,initialDirtyPathsLength:l,operation:r}))return;var d=i(e);if(_p.has(e,d)){var f=mh.node(e,d);e.normalizeNode(f,{operation:r})}c++,u=o(e)}})}};function cg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var{at:n=e.selection,unit:r="offset",reverse:o=!1,voids:i=!1}=t;if(n){var a=mh.range(e,n),[s,u]=Bp.edges(a),l=o?u:s,c=!1,d="",f=0,p=0,h=0,g=[],v=function*(t){var n=g.some(e=>Cp.isAncestor(e,t));function*a(e){n||(yield e)}if(_p.isElement(m)){if(!e.isSelectable(m)){if(g.push(t),o)return Cp.hasPrevious(t)&&(yield*a(mh.end(e,Cp.previous(t)))),0;var v=Cp.next(t);return mh.hasPath(e,v)&&(yield*a(mh.start(e,v))),0}if(!i&&(e.isVoid(m)||e.isElementReadOnly(m)))return yield*a(mh.start(e,t)),0;if(e.isInline(m))return 0;if(mh.hasInlines(e,m)){var y=Cp.isAncestor(t,u.path)?u:mh.end(e,t),E=Cp.isAncestor(t,s.path)?s:mh.start(e,t);d=mh.string(e,{anchor:E,focus:y},{voids:i}),c=!0}}if(_p.isText(m)){var w=Cp.equals(t,l.path);for(w?(p=o?l.offset:m.text.length-l.offset,h=l.offset):(p=m.text.length,h=o?p:0),(w||c||"offset"===r)&&(yield*a({path:t,offset:h}),c=!1);;){if(0===f){if(""===d)break;f=b(d,r,o),d=Yp(d,f,o)[1]}if(h=o?h-f:h+f,(p-=f)<0){f=-p;break}f=0,yield*a({path:t,offset:h})}}};for(var[m,y]of mh.nodes(e,{at:n,reverse:o,voids:i}))yield*v(y)}function b(e,t,n){return"character"===t?Wp(e,n):"word"===t?function(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0,r=!1;e.length>0;){var o=Wp(e,t),[i,a]=Yp(e,o,t);if(Xp(i,a,t))r=!0,n+=o;else{if(r)break;n+=o}e=a}return n}(e,n):"line"===t||"block"===t?e.length:1}}()}function dg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var fg=(e,t)=>{var{selection:n}=e;if(n){var r=(t,n)=>{if(!_p.isText(t))return!1;var[r,o]=mh.parent(e,n);return!e.isVoid(r)||e.markableVoid(r)},o=Bp.isExpanded(n),i=!1;if(!o){var[a,s]=mh.node(e,n);if(a&&r(a,s)){var[u]=mh.parent(e,s);i=u&&e.markableVoid(u)}}if(o||i)Wh.unsetNodes(e,t,{match:r,split:!0,voids:!0});else{var l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dg(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},mh.marks(e)||{});delete l[t],e.marks=l,mp.get(e)||e.onChange()}}};function pg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function hg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pg(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var gg=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};mh.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:o=!1,mode:i="lowest",batchDirty:a=!0}=n,{at:s,match:u,select:l}=n;if(_p.isNode(t)&&(t=[t]),0!==t.length){var[c]=t;if(s||(s=Up(e),!1!==l&&(l=!0)),null==l&&(l=!1),yh.isRange(s))if(r||(s=mh.unhangRange(e,s,{voids:o})),Bp.isCollapsed(s))s=s.anchor;else{var[,d]=Bp.edges(s),f=mh.pointRef(e,d);Wh.delete(e,{at:s}),s=f.unref()}if(yh.isPoint(s)){null==u&&(u=_p.isText(c)?e=>_p.isText(e):e.isInline(c)?t=>_p.isText(t)||mh.isInline(e,t):t=>_p.isElement(t)&&mh.isBlock(e,t));var[p]=mh.nodes(e,{at:s.path,match:u,mode:i,voids:o});if(!p)return;var[,h]=p,g=mh.pathRef(e,h),v=mh.isEnd(e,s,h);Wh.splitNodes(e,{at:s,match:u,mode:i,voids:o});var m=g.unref();s=v?Cp.next(m):m}var y=Cp.parent(s),b=s[s.length-1];if(o||!mh.void(e,{at:y})){if(a){var E=[],w=Cp.levels(y);((e,t,n)=>{var r=Gh.get(e)||!1;Gh.set(e,!0);try{t(),n()}finally{Gh.set(e,r)}})(e,()=>{var n=function(){var t=y.concat(b);b++;var n={type:"insert_node",path:t,node:r};e.apply(n),s=Cp.next(s),E.push(n),_p.isText(r)?w.push(t):w.push(...Array.from(_p.nodes(r),e=>{var[,n]=e;return t.concat(n)}))};for(var r of t)n()},()=>{qh(e,w,e=>{var t=e;for(var n of E)if(Cp.operationCanTransformPath(n)&&!(t=Cp.transform(t,n)))return null;return t})})}else for(var C of t){var D=y.concat(b);b++,e.apply({type:"insert_node",path:D,node:C}),s=Cp.next(s)}if(s=Cp.previous(s),l){var A=mh.end(e,s);A&&Wh.select(e,A)}}}})},vg=["text"],mg=["children"],yg=(e,t)=>t!==e&&(_p.isText(t)||mh.isVoid(e,t)||1===t.children.length&&yg(e,t.children[0])),bg=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};mh.withoutNormalizing(e,()=>{var{mode:n="lowest",voids:r=!1}=t,{match:o,at:i=e.selection,height:a=0,always:s=!1}=t;if(i&&(null==o&&(o=t=>_p.isElement(t)&&mh.isBlock(e,t)),!yh.isRange(i)||(i=((e,t)=>{if(Bp.isCollapsed(t))return t.anchor;var[,n]=Bp.edges(t),r=mh.pointRef(e,n);return Wh.delete(e,{at:t}),r.unref()})(e,i),i))){if(yh.isPath(i)){var u=i,l=mh.point(e,u),[c]=mh.parent(e,u);o=e=>e===c,a=l.path.length-u.length+1,i=l,s=!0}var d,f=mh.pointRef(e,i,{affinity:"backward"});try{var[p]=mh.nodes(e,{at:i,match:o,mode:n,voids:r});if(!p)return;var h=mh.void(e,{at:i,mode:"highest"});if(!r&&h){var[g,v]=h;if(e.isInline(g)){var m=mh.after(e,v);if(!m){var y=Cp.next(v);Wh.insertNodes(e,{text:""},{at:y,voids:r}),m=mh.point(e,y)}i=m,s=!0}a=i.path.length-v.length+1,s=!0}d=mh.pointRef(e,i);var b=i.path.length-a,[,E]=p,w=i.path.slice(0,b),C=0===a?i.offset:i.path[b]+0;for(var[D,A]of mh.levels(e,{at:w,reverse:!0,voids:r})){var S=!1;if(A.length<E.length||0===A.length||!r&&_p.isElement(D)&&mh.isVoid(e,D))break;var O=f.current,x=mh.isEnd(e,O,A);if(s||!f||!mh.isEdge(e,O,A)){S=!0;var N=_p.extractProps(D);e.apply({type:"split_node",path:A,position:C,properties:N})}C=A[A.length-1]+(S||x?1:0)}if(null==t.at){var B=d.current||mh.end(e,[]);Wh.select(e,B)}}finally{var T;f.unref(),null===(T=d)||void 0===T||T.unref()}}})};function Eg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function wg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Eg(Object(n),!0).forEach(function(t){Sp(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Eg(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Cg=()=>{var e={children:[],operations:[],selection:null,marks:null,isElementReadOnly:()=>!1,isInline:()=>!1,isSelectable:()=>!0,isVoid:()=>!1,markableVoid:()=>!1,onChange:()=>{},apply:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Kh(e,...n)},addMark:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t,n)=>{var{selection:r}=e;if(r){var o=(t,n)=>{if(!_p.isText(t))return!1;var[r,o]=mh.parent(e,n);return!e.isVoid(r)||e.markableVoid(r)},i=Bp.isExpanded(r),a=!1;if(!i){var[s,u]=mh.node(e,r);if(s&&o(s,u)){var[l]=mh.parent(e,u);a=l&&e.markableVoid(l)}}if(i||a)Wh.setNodes(e,{[t]:n},{match:o,split:!0,voids:!0});else{var c=Xh(Xh({},mh.marks(e)||{}),{},{[t]:n});e.marks=c,mp.get(e)||e.onChange()}}})(e,...n)},deleteBackward:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var{selection:n}=e;n&&Bp.isCollapsed(n)&&Wh.delete(e,{unit:t,reverse:!0})})(e,...n)},deleteForward:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var{selection:n}=e;n&&Bp.isCollapsed(n)&&Wh.delete(e,{unit:t})})(e,...n)},deleteFragment:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var{direction:t="forward"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{selection:n}=e;n&&Bp.isExpanded(n)&&Wh.delete(e,{reverse:"backward"===t})}(e,...n)},getFragment:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=>{var{selection:t}=e;return t?_p.fragment(e,t):[]})(e,...n)},insertBreak:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=>{Wh.splitNodes(e,{always:!0})})(e,...n)},insertSoftBreak:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=>{Wh.splitNodes(e,{always:!0})})(e,...n)},insertFragment:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};mh.withoutNormalizing(e,()=>{var{hanging:r=!1,voids:o=!1}=n,{at:i=Up(e),batchDirty:a=!0}=n;if(t.length){if(yh.isRange(i))if(r||(i=mh.unhangRange(e,i,{voids:o})),Bp.isCollapsed(i))i=i.anchor;else{var[,s]=Bp.edges(i);if(!o&&mh.void(e,{at:s}))return;var u=mh.pointRef(e,s);Wh.delete(e,{at:i}),i=u.unref()}else yh.isPath(i)&&(i=mh.start(e,i));if(o||!mh.void(e,{at:i})){var l=mh.above(e,{at:i,match:t=>_p.isElement(t)&&mh.isInline(e,t),mode:"highest",voids:o});if(l){var[,c]=l;mh.isEnd(e,i,c)?i=mh.after(e,c):mh.isStart(e,i,c)&&(i=mh.before(e,c))}var d=mh.above(e,{match:t=>_p.isElement(t)&&mh.isBlock(e,t),at:i,voids:o}),[,f]=d,p=mh.isStart(e,i,f),h=mh.isEnd(e,i,f),g=p&&h,[,v]=_p.first({children:t},[]),[,m]=_p.last({children:t},[]),y=t=>{var[n,r]=t;return!(0===r.length||!g&&(!p&&Cp.isAncestor(r,v)&&_p.isElement(n)&&!e.isVoid(n)&&!e.isInline(n)||!h&&Cp.isAncestor(r,m)&&_p.isElement(n)&&!e.isVoid(n)&&!e.isInline(n)))},b=!0,E=[],w=[],C=[];for(var D of _p.nodes({children:t},{pass:y})){var[A,S]=D;b&&_p.isElement(A)&&!e.isInline(A)&&!Cp.isAncestor(S,v)&&(b=!1),y(D)&&(_p.isElement(A)&&!e.isInline(A)?(b=!1,w.push(A)):b?E.push(A):C.push(A))}var[O]=mh.nodes(e,{at:i,match:t=>_p.isText(t)||mh.isInline(e,t),mode:"highest",voids:o}),[,x]=O,N=mh.isStart(e,i,x),B=mh.isEnd(e,i,x),T=mh.pathRef(e,h&&!C.length?Cp.next(f):f),k=mh.pathRef(e,B?Cp.next(x):x),F=C.length>0;Wh.splitNodes(e,{at:i,match:t=>F?_p.isElement(t)&&mh.isBlock(e,t):_p.isText(t)||mh.isInline(e,t),mode:F?"lowest":"highest",always:F&&(!p||E.length>0)&&(!h||C.length>0),voids:o});var I,P=mh.pathRef(e,!N||N&&B?Cp.next(x):x);if(Wh.insertNodes(e,E,{at:P.current,match:t=>_p.isText(t)||mh.isInline(e,t),mode:"highest",voids:o,batchDirty:a}),g&&!E.length&&w.length&&!C.length&&Wh.delete(e,{at:f,voids:o}),Wh.insertNodes(e,w,{at:T.current,match:t=>_p.isElement(t)&&mh.isBlock(e,t),mode:"lowest",voids:o,batchDirty:a}),Wh.insertNodes(e,C,{at:k.current,match:t=>_p.isText(t)||mh.isInline(e,t),mode:"highest",voids:o,batchDirty:a}),!n.at&&(C.length>0&&k.current?I=Cp.previous(k.current):w.length>0&&T.current?I=Cp.previous(T.current):P.current&&(I=Cp.previous(P.current)),I)){var R=mh.end(e,I);Wh.select(e,R)}P.unref(),T.unref(),k.unref()}}})}(e,...n)},insertNode:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t,n)=>{Wh.insertNodes(e,t,n)})(e,...n)},insertText:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ag(e,...n)},normalizeNode:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t,n)=>{var[r,o]=t;if(!_p.isText(r)){"children"in r||(r.children=[]);var i=r;if(i!==e&&0===i.children.length&&(Wh.insertNodes(e,{text:""},{at:o.concat(0),voids:!0}),i=_p.get(e,o)),i!==e&&(e.isInline(i)||_p.isText(i.children[0])||e.isInline(i.children[0])))for(var a=0;a<i.children.length;a++){var s=i.children[a],u=i.children[a-1];_p.isText(s)?null!=u&&_p.isText(u)&&(""===s.text?(Wh.removeNodes(e,{at:o.concat(a),voids:!0}),i=_p.get(e,o),a--):""===u.text?(Wh.removeNodes(e,{at:o.concat(a-1),voids:!0}),i=_p.get(e,o),a--):Nh.equals(s,u,{loose:!0})&&(Wh.mergeNodes(e,{at:o.concat(a),voids:!0}),i=_p.get(e,o),a--)):e.isInline(s)?(null!=u&&_p.isText(u)||(Wh.insertNodes(e,{text:""},{at:o.concat(a),voids:!0}),i=_p.get(e,o),a++),a===i.children.length-1&&(Wh.insertNodes(e,{text:""},{at:o.concat(a+1),voids:!0}),i=_p.get(e,o),a++)):(Wh.unwrapNodes(e,{at:o.concat(a),voids:!0}),i=_p.get(e,o),a--)}else for(var l=0;l<i.children.length;l++){var c=i.children[l];(_p.isText(c)||e.isInline(c))&&(null!=n&&n.fallbackElement?Wh.wrapNodes(e,n.fallbackElement(),{at:o.concat(l),voids:!0}):Wh.removeNodes(e,{at:o.concat(l),voids:!0}),i=_p.get(e,o),l--)}}})(e,...n)},removeMark:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return fg(e,...n)},getDirtyPaths:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{switch(t.type){case"insert_text":case"remove_text":case"set_node":var{path:n}=t;return Cp.levels(n);case"insert_node":var{node:r,path:o}=t,i=Cp.levels(o),a=_p.isText(r)?[]:Array.from(_p.nodes(r),e=>{var[,t]=e;return o.concat(t)});return[...i,...a];case"merge_node":var{path:s}=t;return[...Cp.ancestors(s),Cp.previous(s)];case"move_node":var{path:u,newPath:l}=t;if(Cp.equals(u,l))return[];var c=[],d=[];for(var f of Cp.ancestors(u)){var p=Cp.transform(f,t);c.push(p)}for(var h of Cp.ancestors(l)){var g=Cp.transform(h,t);d.push(g)}var v=d[d.length-1],m=l[l.length-1],y=v.concat(m);return[...c,...d,y];case"remove_node":var{path:b}=t;return[...Cp.ancestors(b)];case"split_node":var{path:E}=t;return[...Cp.levels(E),Cp.next(E)];default:return[]}})(e,...n)},shouldNormalize:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var{iteration:n,initialDirtyPathsLength:r}=t,o=42*r;if(n>o)throw new Error("Could not completely normalize the editor after ".concat(o," iterations! This is usually due to incorrect normalization logic that leaves a node in an invalid state."));return!0})(e,...n)},above:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{voids:n=!1,mode:r="lowest",at:o=e.selection,match:i}=t;if(o){var a=mh.path(e,o);if(!yh.isRange(o)||Cp.equals(o.focus.path,o.anchor.path)){if(0===a.length)return;a=Cp.parent(a)}var s="lowest"===r,[u]=mh.levels(e,{at:a,voids:n,match:i,reverse:s});return u}}(e,...n)},after:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={anchor:mh.point(e,t,{edge:"end"}),focus:mh.end(e,[])},{distance:i=1}=r,a=0;for(var s of mh.positions(e,Jh(Jh({},r),{},{at:o}))){if(a>i)break;0!==a&&(n=s),a++}return n}(e,...n)},before:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={anchor:mh.start(e,[]),focus:mh.point(e,t,{edge:"start"})},{distance:i=1}=r,a=0;for(var s of mh.positions(e,eg(eg({},r),{},{at:o,reverse:!0}))){if(a>i)break;0!==a&&(n=s),a++}return n}(e,...n)},collapse:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{edge:n="anchor"}=t,{selection:r}=e;if(r)if("anchor"===n)Wh.select(e,r.anchor);else if("focus"===n)Wh.select(e,r.focus);else if("start"===n){var[o]=Bp.edges(r);Wh.select(e,o)}else if("end"===n){var[,i]=Bp.edges(r);Wh.select(e,i)}}(e,...n)},delete:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};mh.withoutNormalizing(e,()=>{var n,r,{reverse:o=!1,unit:i="character",distance:a=1,voids:s=!1}=t,{at:u=e.selection,hanging:l=!1}=t;if(u){var c=!1;if(yh.isRange(u)&&Bp.isCollapsed(u)&&(c=!0,u=u.anchor),yh.isPoint(u)){var d=mh.void(e,{at:u,mode:"highest"});if(!s&&d){var[,f]=d;u=f}else{var p={unit:i,distance:a};u={anchor:u,focus:o?mh.before(e,u,p)||mh.start(e,[]):mh.after(e,u,p)||mh.end(e,[])},l=!0}}if(yh.isPath(u))Wh.removeNodes(e,{at:u,voids:s});else if(!Bp.isCollapsed(u)){if(!l){var[,h]=Bp.edges(u),g=mh.end(e,[]);wh.equals(h,g)||(u=mh.unhangRange(e,u,{voids:s}))}var[v,m]=Bp.edges(u),y=mh.above(e,{match:t=>_p.isElement(t)&&mh.isBlock(e,t),at:v,voids:s}),b=mh.above(e,{match:t=>_p.isElement(t)&&mh.isBlock(e,t),at:m,voids:s}),E=y&&b&&!Cp.equals(y[1],b[1]),w=Cp.equals(v.path,m.path),C=s?null:null!==(n=mh.void(e,{at:v,mode:"highest"}))&&void 0!==n?n:mh.elementReadOnly(e,{at:v,mode:"highest"}),D=s?null:null!==(r=mh.void(e,{at:m,mode:"highest"}))&&void 0!==r?r:mh.elementReadOnly(e,{at:m,mode:"highest"});if(C){var A=mh.before(e,v);A&&y&&Cp.isAncestor(y[1],A.path)&&(v=A)}if(D){var S=mh.after(e,m);S&&b&&Cp.isAncestor(b[1],S.path)&&(m=S)}var O,x=[];for(var N of mh.nodes(e,{at:u,voids:s})){var[B,T]=N;O&&0===Cp.compare(T,O)||(!s&&_p.isElement(B)&&(mh.isVoid(e,B)||mh.isElementReadOnly(e,B))||!Cp.isCommon(T,v.path)&&!Cp.isCommon(T,m.path))&&(x.push(N),O=T)}var k=Array.from(x,t=>{var[,n]=t;return mh.pathRef(e,n)}),F=mh.pointRef(e,v),I=mh.pointRef(e,m),P="";if(!w&&!C){var R=F.current,[_]=mh.leaf(e,R),{path:L}=R,{offset:M}=v,j=_.text.slice(M);j.length>0&&(e.apply({type:"remove_text",path:L,offset:M,text:j}),P=j)}if(k.reverse().map(e=>e.unref()).filter(e=>null!==e).forEach(t=>Wh.removeNodes(e,{at:t,voids:s})),!D){var H=I.current,[z]=mh.leaf(e,H),{path:$}=H,U=w?v.offset:0,V=z.text.slice(U,m.offset);V.length>0&&(e.apply({type:"remove_text",path:$,offset:U,text:V}),P=V)}!w&&E&&I.current&&F.current&&Wh.mergeNodes(e,{at:I.current,hanging:!0,voids:s}),c&&o&&"character"===i&&P.length>1&&P.match(/[\u0980-\u09FF\u0E00-\u0E7F\u1000-\u109F\u0900-\u097F\u1780-\u17FF\u0D00-\u0D7F\u0B00-\u0B7F\u0A00-\u0A7F\u0B80-\u0BFF\u0C00-\u0C7F]+/)&&Wh.insertText(e,P.slice(0,P.length-a));var W=F.unref(),G=I.unref(),q=o?W||G:G||W;null==t.at&&q&&Wh.select(e,q)}}})}(e,...n)},deselect:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=>{var{selection:t}=e;t&&e.apply({type:"set_selection",properties:t,newProperties:null})})(e,...n)},edges:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>[mh.start(e,t),mh.end(e,t)])(e,...n)},elementReadOnly:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return mh.above(e,ng(ng({},t),{},{match:t=>_p.isElement(t)&&mh.isElementReadOnly(e,t)}))}(e,...n)},end:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>mh.point(e,t,{edge:"end"}))(e,...n)},first:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var n=mh.path(e,t,{edge:"start"});return mh.node(e,n)})(e,...n)},fragment:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var n=mh.range(e,t);return _p.fragment(e,n)})(e,...n)},getMarks:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var{marks:t,selection:n}=e;if(!n)return null;var{anchor:r,focus:o}=n;if(t)return t;if(Bp.isExpanded(n)){if(Bp.isBackward(n)&&([o,r]=[r,o]),mh.isEnd(e,r,r.path)){var i=mh.after(e,r);i&&(r=i)}var[a]=mh.nodes(e,{match:_p.isText,at:{anchor:r,focus:o}});if(a){var[s]=a;return Op(s,sg)}return{}}var{path:u}=r,[l]=mh.leaf(e,u);if(0===r.offset){var c=mh.previous(e,{at:u,match:_p.isText}),d=mh.above(e,{match:t=>_p.isElement(t)&&mh.isVoid(e,t)&&e.markableVoid(t)});if(!d){var f=mh.above(e,{match:t=>_p.isElement(t)&&mh.isBlock(e,t)});if(c&&f){var[p,h]=c,[,g]=f;Cp.isAncestor(g,h)&&(l=p)}}}return Op(l,ug)}(e,...n)},hasBlocks:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>t.children.some(t=>_p.isElement(t)&&mh.isBlock(e,t)))(e,...n)},hasInlines:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>t.children.some(t=>_p.isText(t)||mh.isInline(e,t)))(e,...n)},hasPath:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>_p.has(e,t))(e,...n)},hasTexts:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>t.children.every(e=>_p.isText(e)))(e,...n)},insertNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return gg(e,...n)},isBlock:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>!e.isInline(t))(e,...n)},isEdge:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t,n)=>mh.isStart(e,t,n)||mh.isEnd(e,t,n))(e,...n)},isEmpty:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var{children:n}=t,[r]=n;return 0===n.length||1===n.length&&_p.isText(r)&&""===r.text&&!e.isVoid(t)})(e,...n)},isEnd:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t,n)=>{var r=mh.end(e,n);return wh.equals(t,r)})(e,...n)},isNormalizing:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=>{var t=yp.get(e);return void 0===t||t})(e,...n)},isStart:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t,n)=>{if(0!==t.offset)return!1;var r=mh.start(e,n);return wh.equals(t,r)})(e,...n)},last:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var n=mh.path(e,t,{edge:"end"});return mh.node(e,n)})(e,...n)},leaf:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=mh.path(e,t,n);return[_p.leaf(e,r),r]}(e,...n)},levels:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var{at:n=e.selection,reverse:r=!1,voids:o=!1}=t,{match:i}=t;if(null==i&&(i=()=>!0),n){var a=[],s=mh.path(e,n);for(var[u,l]of _p.levels(e,s))if(i(u,l)&&(a.push([u,l]),!o&&_p.isElement(u)&&mh.isVoid(e,u)))break;r&&a.reverse(),yield*a}}()}(e,...n)},liftNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};mh.withoutNormalizing(e,()=>{var{at:n=e.selection,mode:r="lowest",voids:o=!1}=t,{match:i}=t;if(n){null==i&&(i=yh.isPath(n)?Vp(e,n):t=>_p.isElement(t)&&mh.isBlock(e,t));var a=mh.nodes(e,{at:n,match:i,mode:r,voids:o}),s=Array.from(a,t=>{var[,n]=t;return mh.pathRef(e,n)});for(var u of s){var l=u.unref();if(l.length<2)throw new Error("Cannot lift node at a path [".concat(l,"] because it has a depth of less than `2`."));var c=mh.node(e,Cp.parent(l)),[d,f]=c,p=l[l.length-1],{length:h}=d.children;if(1===h){var g=Cp.next(f);Wh.moveNodes(e,{at:l,to:g,voids:o}),Wh.removeNodes(e,{at:f,voids:o})}else if(0===p)Wh.moveNodes(e,{at:l,to:f,voids:o});else if(p===h-1){var v=Cp.next(f);Wh.moveNodes(e,{at:l,to:v,voids:o})}else{var m=Cp.next(l),y=Cp.next(f);Wh.splitNodes(e,{at:m,voids:o}),Wh.moveNodes(e,{at:l,to:y,voids:o})}}}})}(e,...n)},mergeNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};mh.withoutNormalizing(e,()=>{var{match:n,at:r=e.selection}=t,{hanging:o=!1,voids:i=!1,mode:a="lowest"}=t;if(r){if(null==n)if(yh.isPath(r)){var[s]=mh.parent(e,r);n=e=>s.children.includes(e)}else n=t=>_p.isElement(t)&&mh.isBlock(e,t);if(!o&&yh.isRange(r)&&(r=mh.unhangRange(e,r,{voids:i})),yh.isRange(r))if(Bp.isCollapsed(r))r=r.anchor;else{var[,u]=Bp.edges(r),l=mh.pointRef(e,u);Wh.delete(e,{at:r}),r=l.unref(),null==t.at&&Wh.select(e,r)}var[c]=mh.nodes(e,{at:r,match:n,voids:i,mode:a}),d=mh.previous(e,{at:r,match:n,voids:i,mode:a});if(c&&d){var[f,p]=c,[h,g]=d;if(0!==p.length&&0!==g.length){var v,m,y=Cp.next(g),b=Cp.common(p,g),E=Cp.isSibling(p,g),w=Array.from(mh.levels(e,{at:p}),e=>{var[t]=e;return t}).slice(b.length).slice(0,-1),C=mh.above(e,{at:p,mode:"highest",match:t=>w.includes(t)&&yg(e,t)}),D=C&&mh.pathRef(e,C[1]);if(_p.isText(f)&&_p.isText(h)){var A=Op(f,vg);m=h.text.length,v=A}else{if(!_p.isElement(f)||!_p.isElement(h))throw new Error("Cannot merge the node at path [".concat(p,"] with the previous sibling because it is not the same kind: ").concat(Dh.stringify(f)," ").concat(Dh.stringify(h)));A=Op(f,mg),m=h.children.length,v=A}E||Wh.moveNodes(e,{at:p,to:y,voids:i}),D&&Wh.removeNodes(e,{at:D.current,voids:i}),mh.shouldMergeNodesRemovePrevNode(e,d,c)?Wh.removeNodes(e,{at:g,voids:i}):e.apply({type:"merge_node",path:y,position:m,properties:v}),D&&D.unref()}}}})}(e,...n)},move:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{selection:n}=e,{distance:r=1,unit:o="character",reverse:i=!1}=t,{edge:a=null}=t;if(n){"start"===a&&(a=Bp.isBackward(n)?"focus":"anchor"),"end"===a&&(a=Bp.isBackward(n)?"anchor":"focus");var{anchor:s,focus:u}=n,l={distance:r,unit:o},c={};if(null==a||"anchor"===a){var d=i?mh.before(e,s,l):mh.after(e,s,l);d&&(c.anchor=d)}if(null==a||"focus"===a){var f=i?mh.before(e,u,l):mh.after(e,u,l);f&&(c.focus=f)}Wh.setSelection(e,c)}}(e,...n)},moveNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{mh.withoutNormalizing(e,()=>{var{to:n,at:r=e.selection,mode:o="lowest",voids:i=!1}=t,{match:a}=t;if(r){null==a&&(a=yh.isPath(r)?Vp(e,r):t=>_p.isElement(t)&&mh.isBlock(e,t));var s=mh.pathRef(e,n),u=mh.nodes(e,{at:r,match:a,mode:o,voids:i}),l=Array.from(u,t=>{var[,n]=t;return mh.pathRef(e,n)});for(var c of l){var d=c.unref(),f=s.current;0!==d.length&&e.apply({type:"move_node",path:d,newPath:f}),s.current&&Cp.isSibling(f,d)&&Cp.isAfter(f,d)&&(s.current=Cp.next(s.current))}s.unref()}})})(e,...n)},next:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:o,at:i=e.selection}=t;if(i){var a=mh.after(e,i,{voids:r});if(a){var[,s]=mh.last(e,[]),u=[a.path,s];if(yh.isPath(i)&&0===i.length)throw new Error("Cannot get the next node from the root node!");if(null==o)if(yh.isPath(i)){var[l]=mh.parent(e,i);o=e=>l.children.includes(e)}else o=()=>!0;var[c]=mh.nodes(e,{at:u,match:o,mode:n,voids:r});return c}}}(e,...n)},node:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=mh.path(e,t,n),o=_p.get(e,r);return[o,r]}(e,...n)},nodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function*(){var{at:n=e.selection,mode:r="all",universal:o=!1,reverse:i=!1,voids:a=!1,pass:s}=t,{match:u}=t;if(u||(u=()=>!0),n){var l,c;if(yh.isSpan(n))l=n[0],c=n[1];else{var d=mh.path(e,n,{edge:"start"}),f=mh.path(e,n,{edge:"end"});l=i?f:d,c=i?d:f}var p,h=_p.nodes(e,{reverse:i,from:l,to:c,pass:t=>{var[n,r]=t;return!(!s||!s([n,r]))||!!_p.isElement(n)&&!(a||!mh.isVoid(e,n)&&!mh.isElementReadOnly(e,n))}}),g=[];for(var[v,m]of h){var y=p&&0===Cp.compare(m,p[1]);if("highest"!==r||!y)if(u(v,m))if("lowest"===r&&y)p=[v,m];else{var b="lowest"===r?p:[v,m];b&&(o?g.push(b):yield b),p=[v,m]}else if(o&&!y&&_p.isText(v))return}"lowest"===r&&p&&(o?g.push(p):yield p),o&&(yield*g)}}()}(e,...n)},normalize:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return lg(e,...n)},parent:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=mh.path(e,t,n),o=Cp.parent(r);return mh.node(e,o)}(e,...n)},path:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{depth:r,edge:o}=n;if(yh.isPath(t))if("start"===o){var[,i]=_p.first(e,t);t=i}else if("end"===o){var[,a]=_p.last(e,t);t=a}return yh.isRange(t)&&(t="start"===o?Bp.start(t):"end"===o?Bp.end(t):Cp.common(t.anchor.path,t.focus.path)),yh.isPoint(t)&&(t=t.path),null!=r&&(t=t.slice(0,r)),t}(e,...n)},pathRef:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,o={current:t,affinity:r,unref(){var{current:t}=o;return mh.pathRefs(e).delete(o),o.current=null,t}};return mh.pathRefs(e).add(o),o}(e,...n)},pathRefs:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=>{var t=bp.get(e);return t||(t=new Set,bp.set(e,t)),t})(e,...n)},point:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{edge:r="start"}=n;if(yh.isPath(t)){var o;if("end"===r){var[,i]=_p.last(e,t);o=i}else{var[,a]=_p.first(e,t);o=a}var s=_p.get(e,o);if(!_p.isText(s))throw new Error("Cannot get the ".concat(r," point in the node at path [").concat(t,"] because it has no ").concat(r," text node."));return{path:o,offset:"end"===r?s.text.length:0}}if(yh.isRange(t)){var[u,l]=Bp.edges(t);return"start"===r?u:l}return t}(e,...n)},pointRef:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,o={current:t,affinity:r,unref(){var{current:t}=o;return mh.pointRefs(e).delete(o),o.current=null,t}};return mh.pointRefs(e).add(o),o}(e,...n)},pointRefs:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=>{var t=Ep.get(e);return t||(t=new Set,Ep.set(e,t)),t})(e,...n)},positions:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return cg(e,...n)},previous:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{mode:n="lowest",voids:r=!1}=t,{match:o,at:i=e.selection}=t;if(i){var a=mh.before(e,i,{voids:r});if(a){var[,s]=mh.first(e,[]),u=[a.path,s];if(yh.isPath(i)&&0===i.length)throw new Error("Cannot get the previous node from the root node!");if(null==o)if(yh.isPath(i)){var[l]=mh.parent(e,i);o=e=>l.children.includes(e)}else o=()=>!0;var[c]=mh.nodes(e,{reverse:!0,at:u,match:o,mode:n,voids:r});return c}}}(e,...n)},range:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t,n)=>yh.isRange(t)&&!n?t:{anchor:mh.start(e,t),focus:mh.end(e,n||t)})(e,...n)},rangeRef:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{affinity:r="forward"}=n,o={current:t,affinity:r,unref(){var{current:t}=o;return mh.rangeRefs(e).delete(o),o.current=null,t}};return mh.rangeRefs(e).add(o),o}(e,...n)},rangeRefs:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=>{var t=wp.get(e);return t||(t=new Set,wp.set(e,t)),t})(e,...n)},removeNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};mh.withoutNormalizing(e,()=>{var{hanging:n=!1,voids:r=!1,mode:o="lowest"}=t,{at:i=e.selection,match:a}=t;if(i){null==a&&(a=yh.isPath(i)?Vp(e,i):t=>_p.isElement(t)&&mh.isBlock(e,t)),!n&&yh.isRange(i)&&(i=mh.unhangRange(e,i,{voids:r}));var s=mh.nodes(e,{at:i,match:a,mode:o,voids:r}),u=Array.from(s,t=>{var[,n]=t;return mh.pathRef(e,n)});for(var l of u){var c=l.unref();if(c){var[d]=mh.node(e,c);e.apply({type:"remove_node",path:c,node:d})}}}})}(e,...n)},select:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var{selection:n}=e;if(t=mh.range(e,t),n)Wh.setSelection(e,t);else{if(!yh.isRange(t))throw new Error("When setting the selection and the current selection is `null` you must provide at least an `anchor` and `focus`, but you passed: ".concat(Dh.stringify(t)));e.apply({type:"set_selection",properties:n,newProperties:t})}})(e,...n)},setNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};mh.withoutNormalizing(e,()=>{var{match:r,at:o=e.selection,compare:i,merge:a}=n,{hanging:s=!1,mode:u="lowest",split:l=!1,voids:c=!1}=n;if(o){if(null==r&&(r=yh.isPath(o)?Vp(e,o):t=>_p.isElement(t)&&mh.isBlock(e,t)),!s&&yh.isRange(o)&&(o=mh.unhangRange(e,o,{voids:c})),l&&yh.isRange(o)){if(Bp.isCollapsed(o)&&mh.leaf(e,o.anchor)[0].text.length>0)return;var d=mh.rangeRef(e,o,{affinity:"inward"}),[f,p]=Bp.edges(o),h="lowest"===u?"lowest":"highest",g=mh.isEnd(e,p,p.path);Wh.splitNodes(e,{at:p,match:r,mode:h,voids:c,always:!g});var v=mh.isStart(e,f,f.path);Wh.splitNodes(e,{at:f,match:r,mode:h,voids:c,always:!v}),o=d.unref(),null==n.at&&Wh.select(e,o)}for(var[m,y]of(i||(i=(e,t)=>e!==t),mh.nodes(e,{at:o,match:r,mode:u,voids:c}))){var b={},E={};if(0!==y.length){var w=!1;for(var C in t)"children"!==C&&"text"!==C&&i(t[C],m[C])&&(w=!0,m.hasOwnProperty(C)&&(b[C]=m[C]),a?null!=t[C]&&(E[C]=a(m[C],t[C])):null!=t[C]&&(E[C]=t[C]));w&&e.apply({type:"set_node",path:y,properties:b,newProperties:E})}}}})}(e,...n)},setNormalizing:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{yp.set(e,t)})(e,...n)},setPoint:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{selection:r}=e,{edge:o="both"}=n;if(r){"start"===o&&(o=Bp.isBackward(r)?"focus":"anchor"),"end"===o&&(o=Bp.isBackward(r)?"anchor":"focus");var{anchor:i,focus:a}=r,s="anchor"===o?i:a;Wh.setSelection(e,{["anchor"===o?"anchor":"focus"]:hg(hg({},s),t)})}}(e,...n)},setSelection:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var{selection:n}=e,r={},o={};if(n){for(var i in t)("anchor"===i&&null!=t.anchor&&!wh.equals(t.anchor,n.anchor)||"focus"===i&&null!=t.focus&&!wh.equals(t.focus,n.focus)||"anchor"!==i&&"focus"!==i&&t[i]!==n[i])&&(r[i]=n[i],o[i]=t[i]);Object.keys(r).length>0&&e.apply({type:"set_selection",properties:r,newProperties:o})}})(e,...n)},splitNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return bg(e,...n)},start:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>mh.point(e,t,{edge:"start"}))(e,...n)},string:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{voids:r=!1}=n,o=mh.range(e,t),[i,a]=Bp.edges(o),s="";for(var[u,l]of mh.nodes(e,{at:o,match:_p.isText,voids:r})){var c=u.text;Cp.equals(l,a.path)&&(c=c.slice(0,a.offset)),Cp.equals(l,i.path)&&(c=c.slice(i.offset)),s+=c}return s}(e,...n)},unhangRange:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{voids:r=!1}=n,[o,i]=Bp.edges(t);if(0!==o.offset||0!==i.offset||Bp.isCollapsed(t)||Cp.hasPrevious(i.path))return t;var a=mh.above(e,{at:i,match:t=>_p.isElement(t)&&mh.isBlock(e,t),voids:r}),s=a?a[1]:[],u={anchor:mh.start(e,o),focus:i},l=!0;for(var[c,d]of mh.nodes(e,{at:u,match:_p.isText,reverse:!0,voids:r}))if(l)l=!1;else if(""!==c.text||Cp.isBefore(d,s)){i={path:d,offset:c.text.length};break}return{anchor:o,focus:i}}(e,...n)},unsetNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Array.isArray(t)||(t=[t]);var r={};for(var o of t)r[o]=null;Wh.setNodes(e,r,n)}(e,...n)},unwrapNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};mh.withoutNormalizing(e,()=>{var{mode:n="lowest",split:r=!1,voids:o=!1}=t,{at:i=e.selection,match:a}=t;if(i){null==a&&(a=yh.isPath(i)?Vp(e,i):t=>_p.isElement(t)&&mh.isBlock(e,t)),yh.isPath(i)&&(i=mh.range(e,i));var s=yh.isRange(i)?mh.rangeRef(e,i):null,u=mh.nodes(e,{at:i,match:a,mode:n,voids:o}),l=Array.from(u,t=>{var[,n]=t;return mh.pathRef(e,n)}).reverse(),c=function(){var t=d.unref(),[n]=mh.node(e,t),i=mh.range(e,t);r&&s&&(i=Bp.intersection(s.current,i)),Wh.liftNodes(e,{at:i,match:e=>!_p.isText(n)&&n.children.includes(e),voids:o})};for(var d of l)c();s&&s.unref()}})}(e,...n)},void:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return mh.above(e,og(og({},t),{},{match:t=>_p.isElement(t)&&mh.isVoid(e,t)}))}(e,...n)},withoutNormalizing:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var n=mh.isNormalizing(e);mh.setNormalizing(e,!1);try{t()}finally{mh.setNormalizing(e,n)}mh.normalize(e)})(e,...n)},wrapNodes:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};mh.withoutNormalizing(e,()=>{var{mode:r="lowest",split:o=!1,voids:i=!1}=n,{match:a,at:s=e.selection}=n;if(s){if(null==a&&(a=yh.isPath(s)?Vp(e,s):e.isInline(t)?t=>_p.isElement(t)&&mh.isInline(e,t)||_p.isText(t):t=>_p.isElement(t)&&mh.isBlock(e,t)),o&&yh.isRange(s)){var[u,l]=Bp.edges(s),c=mh.rangeRef(e,s,{affinity:"inward"}),d=t=>{var n=mh.above(e,{at:t,match:t=>_p.isElement(t)&&mh.isBlock(e,t)});return n&&mh.isEdge(e,t,n[1])};Wh.splitNodes(e,{at:l,match:a,voids:i,always:!d(l)}),Wh.splitNodes(e,{at:u,match:a,voids:i,always:!d(u)}),s=c.unref(),null==n.at&&Wh.select(e,s)}var f=Array.from(mh.nodes(e,{at:s,match:e.isInline(t)?t=>_p.isElement(t)&&mh.isBlock(e,t):e=>_p.isEditor(e),mode:"lowest",voids:i})),p=function(){var n=yh.isRange(s)?Bp.intersection(s,mh.range(e,h)):s;if(!n)return 0;var o=Array.from(mh.nodes(e,{at:n,match:a,mode:r,voids:i}));if(o.length>0){var[u]=o,l=o[o.length-1],[,c]=u,[,d]=l;if(0===c.length&&0===d.length)return 0;var f=Cp.equals(c,d)?Cp.parent(c):Cp.common(c,d),p=mh.range(e,c,d),g=mh.node(e,f),[v]=g,m=f.length+1,y=Cp.next(d.slice(0,m)),b=wg(wg({},t),{},{children:[]});Wh.insertNodes(e,b,{at:y,voids:i}),Wh.moveNodes(e,{at:p,match:e=>!_p.isText(v)&&v.children.includes(e),to:y.concat(0),voids:i})}};for(var[,h]of f)p()}})}(e,...n)},shouldMergeNodesRemovePrevNode:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return((e,t)=>{var[n,r]=t;return _p.isElement(n)&&mh.isEmpty(e,n)||_p.isText(n)&&""===n.text&&0!==r[r.length-1]})(e,...n)}};return e},Dg={isHistory:e=>zp(e)&&Array.isArray(e.redos)&&Array.isArray(e.undos)&&(0===e.redos.length||Hp.isOperationList(e.redos[0].operations))&&(0===e.undos.length||Hp.isOperationList(e.undos[0].operations))},Ag=new WeakMap,Sg=new WeakMap,Og=new WeakMap,xg={isHistoryEditor:e=>Dg.isHistory(e.history)&&mh.isEditor(e),isMerging:e=>Sg.get(e),isSplittingOnce:e=>Og.get(e),setSplittingOnce(e,t){Og.set(e,t)},isSaving:e=>Ag.get(e),redo(e){e.redo()},undo(e){e.undo()},withMerging(e,t){var n=xg.isMerging(e);Sg.set(e,!0),t(),Sg.set(e,n)},withNewBatch(e,t){var n=xg.isMerging(e);Sg.set(e,!0),Og.set(e,!0),t(),Sg.set(e,n),Og.delete(e)},withoutMerging(e,t){var n=xg.isMerging(e);Sg.set(e,!1),t(),Sg.set(e,n)},withoutSaving(e,t){var n=xg.isSaving(e);Ag.set(e,!1);try{t()}finally{Ag.set(e,n)}}},Ng=e=>{var t=e,{apply:n}=t;return t.history={undos:[],redos:[]},t.redo=()=>{var{history:e}=t,{redos:n}=e;if(n.length>0){var r=n[n.length-1];r.selectionBefore&&Wh.setSelection(t,r.selectionBefore),xg.withoutSaving(t,()=>{mh.withoutNormalizing(t,()=>{for(var e of r.operations)t.apply(e)})}),e.redos.pop(),t.writeHistory("undos",r)}},t.undo=()=>{var{history:e}=t,{undos:n}=e;if(n.length>0){var r=n[n.length-1];xg.withoutSaving(t,()=>{mh.withoutNormalizing(t,()=>{var e=r.operations.map(Hp.inverse).reverse();for(var n of e)t.apply(n);r.selectionBefore&&Wh.setSelection(t,r.selectionBefore)})}),t.writeHistory("redos",r),e.undos.pop()}},t.apply=e=>{var{operations:r,history:o}=t,{undos:i}=o,a=i[i.length-1],s=a&&a.operations[a.operations.length-1],u=xg.isSaving(t),l=xg.isMerging(t);if(null==u&&(u=Tg(e)),u){if(null==l&&(l=null!=a&&(!!r.includes(s)||Bg(e,s))),xg.isSplittingOnce(t)&&(l=!1,xg.setSplittingOnce(t,void 0)),a&&l)a.operations.push(e);else{var c={operations:[e],selectionBefore:t.selection};t.writeHistory("undos",c)}for(;i.length>100;)i.shift();o.redos=[]}n(e)},t.writeHistory=(e,n)=>{t.history[e].push(n)},t},Bg=(e,t)=>!(!t||"insert_text"!==e.type||"insert_text"!==t.type||e.offset!==t.offset+t.text.length||!Cp.equals(e.path,t.path))||!(!t||"remove_text"!==e.type||"remove_text"!==t.type||e.offset+e.text.length!==t.offset||!Cp.equals(e.path,t.path)),Tg=(e,t)=>"set_selection"!==e.type,kg=function(e,t){return kg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},kg(e,t)};function Fg(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}kg(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Ig=function(){return Ig=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Ig.apply(this,arguments)};function Pg(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})}function Rg(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function _g(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Lg(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Mg(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function jg(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=_g(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){(function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)})(r,o,(t=e[n](t)).done,t.value)})}}}"function"==typeof SuppressedError&&SuppressedError;var Hg,zg={exports:{}};var $g,Ug,Vg=(Hg||(Hg=1,function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,o="[object Arguments]",i="[object Boolean]",a="[object Date]",s="[object Function]",u="[object GeneratorFunction]",l="[object Map]",c="[object Number]",d="[object Object]",f="[object Promise]",p="[object RegExp]",h="[object Set]",g="[object String]",v="[object Symbol]",m="[object WeakMap]",b="[object ArrayBuffer]",E="[object DataView]",w="[object Float32Array]",C="[object Float64Array]",D="[object Int8Array]",A="[object Int16Array]",S="[object Int32Array]",O="[object Uint8Array]",x="[object Uint8ClampedArray]",N="[object Uint16Array]",B="[object Uint32Array]",T=/\w*$/,k=/^\[object .+?Constructor\]$/,F=/^(?:0|[1-9]\d*)$/,I={};I[o]=I["[object Array]"]=I[b]=I[E]=I[i]=I[a]=I[w]=I[C]=I[D]=I[A]=I[S]=I[l]=I[c]=I[d]=I[p]=I[h]=I[g]=I[v]=I[O]=I[x]=I[N]=I[B]=!0,I["[object Error]"]=I[s]=I[m]=!1;var P="object"==typeof y&&y&&y.Object===Object&&y,R="object"==typeof self&&self&&self.Object===Object&&self,_=P||R||Function("return this")(),L=t&&!t.nodeType&&t,M=L&&e&&!e.nodeType&&e,j=M&&M.exports===L;function H(e,t){return e.set(t[0],t[1]),e}function z(e,t){return e.add(t),e}function $(e,t,n,r){for(var o=-1,i=e?e.length:0;++o<i;)n=t(n,e[o],o,e);return n}function U(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function V(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function W(e,t){return function(n){return e(t(n))}}function G(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var q=Array.prototype,K=Function.prototype,Y=Object.prototype,X=_["__core-js_shared__"],Z=function(){var e=/[^.]+$/.exec(X&&X.keys&&X.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),J=K.toString,Q=Y.hasOwnProperty,ee=Y.toString,te=RegExp("^"+J.call(Q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ne=j?_.Buffer:void 0,re=_.Symbol,oe=_.Uint8Array,ie=W(Object.getPrototypeOf,Object),ae=Object.create,se=Y.propertyIsEnumerable,ue=q.splice,le=Object.getOwnPropertySymbols,ce=ne?ne.isBuffer:void 0,de=W(Object.keys,Object),fe=Le(_,"DataView"),pe=Le(_,"Map"),he=Le(_,"Promise"),ge=Le(_,"Set"),ve=Le(_,"WeakMap"),me=Le(Object,"create"),ye=$e(fe),be=$e(pe),Ee=$e(he),we=$e(ge),Ce=$e(ve),De=re?re.prototype:void 0,Ae=De?De.valueOf:void 0;function Se(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Oe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function xe(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ne(e){this.__data__=new Oe(e)}function Be(e,t){var n=Ve(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&We(e)}(e)&&Q.call(e,"callee")&&(!se.call(e,"callee")||ee.call(e)==o)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],r=n.length,i=!!r;for(var a in e)!Q.call(e,a)||i&&("length"==a||He(a,r))||n.push(a);return n}function Te(e,t,n){var r=e[t];Q.call(e,t)&&Ue(r,n)&&(void 0!==n||t in e)||(e[t]=n)}function ke(e,t){for(var n=e.length;n--;)if(Ue(e[n][0],t))return n;return-1}function Fe(e,t,n,r,f,m,y){var k;if(r&&(k=m?r(e,f,m,y):r(e)),void 0!==k)return k;if(!Ke(e))return e;var F=Ve(e);if(F){if(k=function(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&Q.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!t)return function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e,k)}else{var P=je(e),R=P==s||P==u;if(Ge(e))return function(e,t){if(t)return e.slice();var n=new e.constructor(e.length);return e.copy(n),n}(e,t);if(P==d||P==o||R&&!m){if(U(e))return m?e:{};if(k=function(e){return"function"!=typeof e.constructor||ze(e)?{}:Ke(t=ie(e))?ae(t):{};var t}(R?{}:e),!t)return function(e,t){return Re(e,Me(e),t)}(e,function(e,t){return e&&Re(t,Ye(t),e)}(k,e))}else{if(!I[P])return m?e:{};k=function(e,t,n,r){var o=e.constructor;switch(t){case b:return Pe(e);case i:case a:return new o(+e);case E:return function(e,t){var n=t?Pe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,r);case w:case C:case D:case A:case S:case O:case x:case N:case B:return function(e,t){var n=t?Pe(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}(e,r);case l:return function(e,t,n){var r=t?n(V(e),!0):V(e);return $(r,H,new e.constructor)}(e,r,n);case c:case g:return new o(e);case p:return function(e){var t=new e.constructor(e.source,T.exec(e));return t.lastIndex=e.lastIndex,t}(e);case h:return function(e,t,n){var r=t?n(G(e),!0):G(e);return $(r,z,new e.constructor)}(e,r,n);case v:return function(e){return Ae?Object(Ae.call(e)):{}}(e)}}(e,P,Fe,t)}}y||(y=new Ne);var _=y.get(e);if(_)return _;if(y.set(e,k),!F)var L=n?function(e){return function(e,t,n){var r=t(e);return Ve(e)?r:function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}(r,n(e))}(e,Ye,Me)}(e):Ye(e);return function(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););}(L||e,function(o,i){L&&(o=e[i=o]),Te(k,i,Fe(o,t,n,r,i,e,y))}),k}function Ie(e){return!(!Ke(e)||(t=e,Z&&Z in t))&&(qe(e)||U(e)?te:k).test($e(e));var t}function Pe(e){var t=new e.constructor(e.byteLength);return new oe(t).set(new oe(e)),t}function Re(e,t,n,r){n||(n={});for(var o=-1,i=t.length;++o<i;){var a=t[o];Te(n,a,e[a])}return n}function _e(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function Le(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Ie(n)?n:void 0}Se.prototype.clear=function(){this.__data__=me?me(null):{}},Se.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},Se.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===n?void 0:r}return Q.call(t,e)?t[e]:void 0},Se.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:Q.call(t,e)},Se.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?n:t,this},Oe.prototype.clear=function(){this.__data__=[]},Oe.prototype.delete=function(e){var t=this.__data__,n=ke(t,e);return!(n<0||(n==t.length-1?t.pop():ue.call(t,n,1),0))},Oe.prototype.get=function(e){var t=this.__data__,n=ke(t,e);return n<0?void 0:t[n][1]},Oe.prototype.has=function(e){return ke(this.__data__,e)>-1},Oe.prototype.set=function(e,t){var n=this.__data__,r=ke(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},xe.prototype.clear=function(){this.__data__={hash:new Se,map:new(pe||Oe),string:new Se}},xe.prototype.delete=function(e){return _e(this,e).delete(e)},xe.prototype.get=function(e){return _e(this,e).get(e)},xe.prototype.has=function(e){return _e(this,e).has(e)},xe.prototype.set=function(e,t){return _e(this,e).set(e,t),this},Ne.prototype.clear=function(){this.__data__=new Oe},Ne.prototype.delete=function(e){return this.__data__.delete(e)},Ne.prototype.get=function(e){return this.__data__.get(e)},Ne.prototype.has=function(e){return this.__data__.has(e)},Ne.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Oe){var r=n.__data__;if(!pe||r.length<199)return r.push([e,t]),this;n=this.__data__=new xe(r)}return n.set(e,t),this};var Me=le?W(le,Object):function(){return[]},je=function(e){return ee.call(e)};function He(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||F.test(e))&&e>-1&&e%1==0&&e<t}function ze(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Y)}function $e(e){if(null!=e){try{return J.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Ue(e,t){return e===t||e!=e&&t!=t}(fe&&je(new fe(new ArrayBuffer(1)))!=E||pe&&je(new pe)!=l||he&&je(he.resolve())!=f||ge&&je(new ge)!=h||ve&&je(new ve)!=m)&&(je=function(e){var t=ee.call(e),n=t==d?e.constructor:void 0,r=n?$e(n):void 0;if(r)switch(r){case ye:return E;case be:return l;case Ee:return f;case we:return h;case Ce:return m}return t});var Ve=Array.isArray;function We(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}(e.length)&&!qe(e)}var Ge=ce||function(){return!1};function qe(e){var t=Ke(e)?ee.call(e):"";return t==s||t==u}function Ke(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function Ye(e){return We(e)?Be(e):function(e){if(!ze(e))return de(e);var t=[];for(var n in Object(e))Q.call(e,n)&&"constructor"!=n&&t.push(n);return t}(e)}e.exports=function(e){return Fe(e,!0,!0)}}(zg,zg.exports)),zg.exports),Wg=b(Vg);var Gg=function(){if(Ug)return $g;Ug=1;var e=9007199254740991,t="[object Arguments]",n="[object Function]",r="[object GeneratorFunction]",o=/^(?:0|[1-9]\d*)$/;function i(e,t){for(var n=-1,r=e?e.length:0;++n<r&&!1!==t(e[n],n,e););return e}var a,s,u=Object.prototype,l=u.hasOwnProperty,c=u.toString,d=u.propertyIsEnumerable,f=(a=Object.keys,s=Object,function(e){return a(s(e))});function p(e,n){var r=b(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&E(e)}(e)&&l.call(e,"callee")&&(!d.call(e,"callee")||c.call(e)==t)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=r.length,i=!!o;for(var a in e)!l.call(e,a)||i&&("length"==a||y(a,o))||r.push(a);return r}var h,g=(h=function(e,t){return e&&v(e,t,w)},function(e,t){if(null==e)return e;if(!E(e))return h(e,t);for(var n=e.length,r=-1,o=Object(e);++r<n&&!1!==t(o[r],r,o););return e}),v=function(e,t,n){for(var r=-1,o=Object(e),i=n(e),a=i.length;a--;){var s=i[++r];if(!1===t(o[s],s,o))break}return e};function m(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||u,t!==r)return f(e);var t,n,r,o=[];for(var i in Object(e))l.call(e,i)&&"constructor"!=i&&o.push(i);return o}function y(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||o.test(t))&&t>-1&&t%1==0&&t<n}var b=Array.isArray;function E(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?c.call(e):"";return t==n||t==r}(t)}function w(e){return E(e)?p(e):m(e)}function C(e){return e}return $g=function(e,t){return(b(e)?i:g)(e,"function"==typeof t?t:C)}}(),qg=b(Gg),Kg=new Set(["base","embed","math","meta","object","script","svg","template"]),Yg=new Set(["href","poster","src","xlink:href"]),Xg=["java","script:"].join("");function Zg(e,t,n){var r=function(e){return Array.from(e).filter(function(e){return e>" "}).join("").toLowerCase()}(n);return!r||!r.startsWith(Xg)&&!r.startsWith("vbscript:")&&(!r.startsWith("data:")||"href"!==t&&"xlink:href"!==t&&(("img"===e||"poster"===t)&&r.startsWith("data:image/")))}function Jg(e){if(void 0===e&&(e=""),!e)return"";var t=(new DOMParser).parseFromString(e,"text/html");return Array.from(t.body.querySelectorAll("*")).forEach(function(e){var t=e.tagName.toLowerCase();Kg.has(t)?e.remove():Array.from(e.attributes).forEach(function(n){var r=n.name.toLowerCase(),o=n.value||"";("srcdoc"===r||r.startsWith("on")||Yg.has(r)&&!Zg(t,r,o))&&e.removeAttribute(n.name)})}),t.body.innerHTML}var Qg={};var ev="created",tv="destroyed",nv="change",rv="scroll",ov="fullscreen",iv="unFullScreen",av="modalOrPanelShow",sv="modalOrPanelHide",uv={};function lv(e,t){var n=e.key,r=e.factory,o=e.config,i=Ig(Ig({},o),t||{});if(null!=uv[n])throw new Error("Duplicated key '".concat(n,"' in menu items"));uv[n]=r,function(e,t){null!=t&&(Qg[e]=t)}(n,i)}var cv=new WeakMap,dv=new WeakMap,fv=new WeakMap,pv=new WeakMap,hv=new WeakMap,gv=new WeakMap,vv=new WeakMap,mv=new WeakMap,yv=new WeakMap,bv=new WeakMap,Ev=new WeakMap,wv=new WeakMap,Cv=new WeakMap,Dv=new WeakMap,Av=new WeakMap,Sv=new WeakMap,Ov=new WeakMap,xv=new WeakMap,Nv=new WeakMap,Bv=new WeakMap,Tv=new WeakMap,kv=new WeakMap,Fv=new WeakMap,Iv=new WeakMap,Pv=new WeakMap,Rv=new WeakMap,_v=new WeakMap,Lv=new WeakMap,Mv=new WeakMap,jv=function(e){var t=e;return t.getAllMenuKeys=function(){var e=[];for(var t in uv)e.push(t);return e},t.getConfig=function(){var e=bv.get(t);if(null==e)throw new Error("Can not get editor config");return e},t.getMenuConfig=function(e){var n=t.getConfig().MENU_CONF;return(void 0===n?{}:n)[e]||{}},t.alert=function(e,n){void 0===n&&(n="info");var r=t.getConfig().customAlert;r&&r(e,n)},t},Hv=new Set(["doctype","!doctype","meta","script","style","link","frame","iframe","title","svg"]);function zv(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function $v(e={},t={}){Object.keys(t).forEach(n=>{void 0===e[n]?e[n]=t[n]:zv(t[n])&&zv(e[n])&&Object.keys(t[n]).length>0&&$v(e[n],t[n])})}const Uv={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function Vv(){const e="undefined"!=typeof document?document:{};return $v(e,Uv),e}const Wv={document:Uv,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function Gv(){const e="undefined"!=typeof window?window:{};return $v(e,Wv),e}class qv extends Array{constructor(e){"number"==typeof e?super(e):(super(...e||[]),function(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get:()=>t,set(e){t.__proto__=e}})}(this))}}function Kv(e=[]){const t=[];return e.forEach(e=>{Array.isArray(e)?t.push(...Kv(e)):t.push(e)}),t}function Yv(e,t){return Array.prototype.filter.call(e,t)}function Xv(e){return e.toLowerCase().replace(/-(.)/g,(e,t)=>t.toUpperCase())}function Zv(e,t){const n=Gv(),r=Vv();let o=[];if(!t&&e instanceof qv)return e;if(!e)return new qv(o);if("string"==typeof e){const n=e.trim();if(n.indexOf("<")>=0&&n.indexOf(">")>=0){let e="div";0===n.indexOf("<li")&&(e="ul"),0===n.indexOf("<tr")&&(e="tbody"),0!==n.indexOf("<td")&&0!==n.indexOf("<th")||(e="tr"),0===n.indexOf("<tbody")&&(e="table"),0===n.indexOf("<option")&&(e="select");const t=r.createElement(e);t.innerHTML=n;for(let e=0;e<t.childNodes.length;e+=1)o.push(t.childNodes[e])}else o=function(e,t){if("string"!=typeof e)return[e];const n=[],r=t.querySelectorAll(e);for(let e=0;e<r.length;e+=1)n.push(r[e]);return n}(e.trim(),t||r)}else if(e.nodeType||e===n||e===r)o.push(e);else if(Array.isArray(e)){if(e instanceof qv)return e;o=e}return new qv(function(e){const t=[];for(let n=0;n<e.length;n+=1)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(o))}function Jv(...e){const t=Kv(e.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.add(...t)}),this}function Qv(...e){const t=Kv(e.map(e=>e.split(" ")));return this.forEach(e=>{e.classList.remove(...t)}),this}function em(...e){const t=Kv(e.map(e=>e.split(" ")));return Yv(this,e=>t.filter(t=>e.classList.contains(t)).length>0).length>0}function tm(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let n=0;n<this.length;n+=1)if(2===arguments.length)this[n].setAttribute(e,t);else for(const t in e)this[n][t]=e[t],this[n].setAttribute(t,e[t]);return this}function nm(e){for(let t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this}function rm(e,t){let n;if(void 0===t){if(n=this[0],!n)return;if(n.dom7ElementDataStorage&&e in n.dom7ElementDataStorage)return n.dom7ElementDataStorage[e];const t=n.getAttribute(`data-${e}`);return t||void 0}for(let r=0;r<this.length;r+=1)n=this[r],n.dom7ElementDataStorage||(n.dom7ElementDataStorage={}),n.dom7ElementDataStorage[e]=t;return this}function om(){const e=this[0];if(!e)return;const t={};if(e.dataset)for(const n in e.dataset)t[n]=e.dataset[n];else for(let n=0;n<e.attributes.length;n+=1){const r=e.attributes[n];r.name.indexOf("data-")>=0&&(t[Xv(r.name.split("data-")[1])]=r.value)}for(const e in t)"false"===t[e]?t[e]=!1:"true"===t[e]?t[e]=!0:parseFloat(t[e])===1*t[e]&&(t[e]*=1);return t}function im(e){if(void 0===e){const e=this[0];if(!e)return;if(e.multiple&&"select"===e.nodeName.toLowerCase()){const t=[];for(let n=0;n<e.selectedOptions.length;n+=1)t.push(e.selectedOptions[n].value);return t}return e.value}for(let t=0;t<this.length;t+=1){const n=this[t];if(Array.isArray(e)&&n.multiple&&"select"===n.nodeName.toLowerCase())for(let t=0;t<n.options.length;t+=1)n.options[t].selected=e.indexOf(n.options[t].value)>=0;else n.value=e}return this}function am(...e){let[t,n,r,o]=e;function i(e){const t=e.target;if(!t)return;const o=e.target.dom7EventData||[];if(o.indexOf(e)<0&&o.unshift(e),Zv(t).is(n))r.apply(t,o);else{const e=Zv(t).parents();for(let t=0;t<e.length;t+=1)Zv(e[t]).is(n)&&r.apply(e[t],o)}}function a(e){const t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),r.apply(this,t)}"function"==typeof e[1]&&([t,r,o]=e,n=void 0),o||(o=!1);const s=t.split(" ");let u;for(let e=0;e<this.length;e+=1){const t=this[e];if(n)for(u=0;u<s.length;u+=1){const e=s[u];t.dom7LiveListeners||(t.dom7LiveListeners={}),t.dom7LiveListeners[e]||(t.dom7LiveListeners[e]=[]),t.dom7LiveListeners[e].push({listener:r,proxyListener:i}),t.addEventListener(e,i,o)}else for(u=0;u<s.length;u+=1){const e=s[u];t.dom7Listeners||(t.dom7Listeners={}),t.dom7Listeners[e]||(t.dom7Listeners[e]=[]),t.dom7Listeners[e].push({listener:r,proxyListener:a}),t.addEventListener(e,a,o)}}return this}function sm(...e){let[t,n,r,o]=e;"function"==typeof e[1]&&([t,r,o]=e,n=void 0),o||(o=!1);const i=t.split(" ");for(let e=0;e<i.length;e+=1){const t=i[e];for(let e=0;e<this.length;e+=1){const i=this[e];let a;if(!n&&i.dom7Listeners?a=i.dom7Listeners[t]:n&&i.dom7LiveListeners&&(a=i.dom7LiveListeners[t]),a&&a.length)for(let e=a.length-1;e>=0;e-=1){const n=a[e];r&&n.listener===r||r&&n.listener&&n.listener.dom7proxy&&n.listener.dom7proxy===r?(i.removeEventListener(t,n.proxyListener,o),a.splice(e,1)):r||(i.removeEventListener(t,n.proxyListener,o),a.splice(e,1))}}}return this}function um(){const e=Gv();return this[0]===e?e.innerWidth:this.length>0?parseFloat(this.css("width")):null}function lm(){const e=Gv();return this[0]===e?e.innerHeight:this.length>0?parseFloat(this.css("height")):null}function cm(){if(this.length>0){const e=Gv(),t=Vv(),n=this[0],r=n.getBoundingClientRect(),o=t.body,i=n.clientTop||o.clientTop||0,a=n.clientLeft||o.clientLeft||0,s=n===e?e.scrollY:n.scrollTop,u=n===e?e.scrollX:n.scrollLeft;return{top:r.top+s-i,left:r.left+u-a}}return null}function dm(){for(let e=0;e<this.length;e+=1)this[e].style.display="none";return this}function fm(){const e=Gv();for(let t=0;t<this.length;t+=1){const n=this[t];"none"===n.style.display&&(n.style.display=""),"none"===e.getComputedStyle(n,null).getPropertyValue("display")&&(n.style.display="block")}return this}function pm(e,t){const n=Gv();let r;if(1===arguments.length){if("string"!=typeof e){for(r=0;r<this.length;r+=1)for(const t in e)this[r].style[t]=e[t];return this}if(this[0])return n.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(r=0;r<this.length;r+=1)this[r].style[e]=t;return this}return this}function hm(e){return e?(this.forEach((t,n)=>{e.apply(t,[t,n])}),this):this}function gm(e){return Zv(Yv(this,e))}function vm(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(let t=0;t<this.length;t+=1)this[t].innerHTML=e;return this}function mm(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(let t=0;t<this.length;t+=1)this[t].textContent=e;return this}function ym(e){const t=Gv(),n=Vv(),r=this[0];let o,i;if(!r||void 0===e)return!1;if("string"==typeof e){if(r.matches)return r.matches(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);for(o=Zv(e),i=0;i<o.length;i+=1)if(o[i]===r)return!0;return!1}if(e===n)return r===n;if(e===t)return r===t;if(e.nodeType||e instanceof qv){for(o=e.nodeType?[e]:e,i=0;i<o.length;i+=1)if(o[i]===r)return!0;return!1}return!1}function bm(...e){let t;const n=Vv();for(let r=0;r<e.length;r+=1){t=e[r];for(let e=0;e<this.length;e+=1)if("string"==typeof t){const r=n.createElement("div");for(r.innerHTML=t;r.firstChild;)this[e].appendChild(r.firstChild)}else if(t instanceof qv)for(let n=0;n<t.length;n+=1)this[e].appendChild(t[n]);else this[e].appendChild(t)}return this}function Em(e){const t=Vv();let n,r;for(n=0;n<this.length;n+=1)if("string"==typeof e){const o=t.createElement("div");for(o.innerHTML=e,r=o.childNodes.length-1;r>=0;r-=1)this[n].insertBefore(o.childNodes[r],this[n].childNodes[0])}else if(e instanceof qv)for(r=0;r<e.length;r+=1)this[n].insertBefore(e[r],this[n].childNodes[0]);else this[n].insertBefore(e,this[n].childNodes[0]);return this}function wm(e){const t=[];for(let n=0;n<this.length;n+=1)null!==this[n].parentNode&&(e?Zv(this[n].parentNode).is(e)&&t.push(this[n].parentNode):t.push(this[n].parentNode));return Zv(t)}function Cm(e){const t=[];for(let n=0;n<this.length;n+=1){let r=this[n].parentNode;for(;r;)e?Zv(r).is(e)&&t.push(r):t.push(r),r=r.parentNode}return Zv(t)}function Dm(e){const t=[];for(let n=0;n<this.length;n+=1){const r=this[n].querySelectorAll(e);for(let e=0;e<r.length;e+=1)t.push(r[e])}return Zv(t)}function Am(e){const t=[];for(let n=0;n<this.length;n+=1){const r=this[n].children;for(let n=0;n<r.length;n+=1)e&&!Zv(r[n]).is(e)||t.push(r[n])}return Zv(t)}function Sm(){for(let e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}function Om(){for(let e=0;e<this.length;e+=1){const t=this[e];if(1===t.nodeType){for(let e=0;e<t.childNodes.length;e+=1)t.childNodes[e].parentNode&&t.childNodes[e].parentNode.removeChild(t.childNodes[e]);t.textContent=""}}return this}Zv.fn=qv.prototype;const xm="resize scroll".split(" ");function Nm(e){return function(...t){if(void 0===t[0]){for(let t=0;t<this.length;t+=1)xm.indexOf(e)<0&&(e in this[t]?this[t][e]():Zv(this[t]).trigger(e));return this}return this.on(e,...t)}}const Bm=Nm("click"),Tm=Nm("focus"),km=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];let Fm=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[e]];return t};function Im(e){Promise.resolve().then(e)}function Pm(e){return e.replace(/ /g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™").replace(/"/g,'"')}var Rm,_m=function(e){return Object.prototype.toString.call(e)},Lm=globalThis.Node;pm&&(Zv.fn.css=pm),bm&&(Zv.fn.append=bm),Jv&&(Zv.fn.addClass=Jv),Qv&&(Zv.fn.removeClass=Qv),em&&(Zv.fn.hasClass=em),am&&(Zv.fn.on=am),Tm&&(Zv.fn.focus=Tm),tm&&(Zv.fn.attr=tm),nm&&(Zv.fn.removeAttr=nm),dm&&(Zv.fn.hide=dm),fm&&(Zv.fn.show=fm),cm&&(Zv.fn.offset=cm),um&&(Zv.fn.width=um),lm&&(Zv.fn.height=lm),wm&&(Zv.fn.parent=wm),Cm&&(Zv.fn.parents=Cm),ym&&(Zv.fn.is=ym),om&&(Zv.fn.dataset=om),im&&(Zv.fn.val=im),mm&&(Zv.fn.text=mm),vm&&(Zv.fn.html=vm),Am&&(Zv.fn.children=Am),Sm&&(Zv.fn.remove=Sm),Dm&&(Zv.fn.find=Dm),hm&&(Zv.fn.each=hm),Om&&(Zv.fn.empty=Om),function(e){e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(Rm||(Rm={}));var Mm=/\[object HTML([A-Z][a-z]*)*Element\]/,jm=function(e){return Mm.test(_m(e))},Hm=function(e){return null!=e&&"number"==typeof e.nodeType},zm=function(e){return Hm(e)&&e.nodeType===Rm.COMMENT_NODE},$m=function(e){return Hm(e)&&e.nodeType===Rm.ELEMENT_NODE},Um=function(e){return"[object Selection]"===_m(e)},Vm=function(e){return Hm(e)&&e.nodeType===Rm.TEXT_NODE},Wm=function(e){var t,n,r;return null!==(t=window&&window.document.getElementById(e))&&void 0!==t?t:window&&(null===(r=null===(n=window.document.activeElement)||void 0===n?void 0:n.shadowRoot)||void 0===r?void 0:r.getElementById(e))||null},Gm=function(e,t,n){for(var r=e.childNodes,o=r[t],i=t,a=!1,s=!1;(zm(o)||$m(o)&&0===o.childNodes.length||$m(o)&&"false"===o.getAttribute("contenteditable"))&&(!a||!s);)i>=r.length?(a=!0,i=t-1,n="backward"):i<0?(s=!0,i=t+1,n="forward"):(o=r[i],t=i,i+="forward"===n?1:-1);return[o,t]},qm=function(e,t,n){return Lg(Gm(e,t,n),1)[0]},Km=function(e){var t,n,r="";if(Vm(e)&&e.nodeValue)return e.nodeValue;if($m(e)){try{for(var o=_g(Array.from(e.childNodes)),i=o.next();!i.done;i=o.next()){var a=i.value;r+=Km(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}var s=getComputedStyle(e).getPropertyValue("display");"block"!==s&&"list"!==s&&"table-row"!==s&&"BR"!==e.tagName||(r+="\n")}return r};function Ym(e,t){if(!jm(e)||"true"!==e.dataset.slateVoid)for(var n=e.childNodes,r=n.length;r-=1;){var o=n[r],i=o.nodeType;Vm(o)?t(o,e):[Rm.ELEMENT_NODE,Rm.DOCUMENT_NODE,Rm.DOCUMENT_FRAGMENT_NODE].includes(i)&&Ym(o,t)}}function Xm(e){if(0===e.length)return"";var t=e[0];return t.nodeType!==Rm.ELEMENT_NODE?"":t.tagName.toLowerCase()}var Zm=new RegExp(String.fromCharCode(160),"g");function Jm(e){return e.replace(Zm," ")}var Qm=["span","b","strong","i","em","s","strike","u","font","sub","sup"],ey=[];var ty=[];var ny={};function ry(e,t){var n=e.length;if(n){var r=e[n-1];if(Nh.isText(r)){var o=Object.keys(r);if(1===o.length&&"text"===o[0])return r.text+=t,!0}}return!1}function oy(e,t,n){return{type:"paragraph",children:[{text:Zv(e).text().replace(/\s+/gm," ")}]}}function iy(e,t){var n=function(e,t){var n=[];if(null!=e.attr("data-w-e-is-void"))return n;var r=e[0].childNodes;return 1===r.length&&"BR"===r[0].nodeName?(n.push({text:""}),n):(r.forEach(function(e){if($m(e)){if("BR"===e.nodeName)return void(ry(n,"\n")||n.push({text:"\n"}));var r=cy(Zv(e),t);Array.isArray(r)?r.forEach(function(e){return n.push(e)}):n.push(r)}else if(Vm(e)){var o=e.textContent||"";if(""===o.trim()&&o.indexOf("\n")>=0)return;o&&(o=Jm(o),ry(n,o)||n.push({text:o}))}}),n)}(e,t),r=function(e){for(var t in ny)if(e[0].matches(t))return ny[t];return oy}(e),o=r(e[0],n,t);return Array.isArray(o)||(o=[o]),o.forEach(function(r){mh.isVoid(t,r)||(0===n.length&&(r.children=[{text:e.text().replace(/\s+/gm," ")}]),ty.forEach(function(n){r=n(e[0],r,t)}))}),o}function ay(e,t){0===e.parents("pre").length&&(e[0].innerHTML=e[0].innerHTML.replace(/[\r\n\t]+/g,"").replace(/<br>/g,"\n"));var n=e[0].textContent||"",r={text:n=Jm(n=Pm(n))};return ty.forEach(function(n){r=n(e[0],r,t)}),r}function sy(e,t){var n={text:""};return ty.forEach(function(r){n=r(e[0],n,t)}),n}function uy(e,t){var n=t.parentElement;return null==n?e:(null==n.closest("pre")&&(e=e.replace(/[\r\n\t]+/g,"")),e=Jm(e=Pm(e)))}function ly(e,t,n){var r=e[0];if($m(r)){var o=cy(e,n);return delete t.text,Array.isArray(o)?o.map(function(e){return Ig(Ig({},t),e)}):[Ig(Ig({},t),o)]}if(zm(r))return null;var i=Vm(r)?{text:uy(r.textContent||"",r)}:ay(e,n);return[Ig(Ig({},t),i)]}function cy(e,t){ey.forEach(function(t){var n=t.selector,r=t.preParseHtml;e[0].matches(n)&&(e=Zv(r(e[0])))});var n=Xm(e);if("span"===n){if(e.attr("data-w-e-type"))return iy(e,t);if((o=Array.from(e[0].childNodes)).some(function(e){return!Vm(e)&&!zm(e)})){var r=sy(Zv(e[0]),t);return o.flatMap(function(e){return ly(Zv(e),r,t)||[]})}return ay(e,t)}if("code"===n)return"pre"===Xm(e.parent())?iy(e,t):ay(e,t);if(Qm.includes(n)){var o;if((o=Array.from(e[0].childNodes)).some(function(e){return!Vm(e)&&!zm(e)})){var i=sy(Zv(e[0]),t);return o.flatMap(function(e){return ly(Zv(e),i,t)||[]})}return ay(e,t)}return iy(e,t)}function dy(e,t,n){var r=Zv(n);return!!r.attr(t)||(r.attr(t,"true"),e.on(tv,function(){r.removeAttr(t)}),!1)}function fy(e,t){void 0===t&&(t="");var n=[],r=e.getConfig().sanitizeHtml;""===t&&(t="<p><br></p>"),0!==t.indexOf("<")&&(t=t.split(/\n/).map(function(e){return"<p>".concat(e,"</p>")}).join("")),t=r?r(t):t;var o=Zv("<div>".concat(t,"</div>"));return Array.from(o.children()).forEach(function(t){var r=cy(Zv(t),e);Array.isArray(r)?r.forEach(function(e){return n.push(e)}):n.push(r)}),n}function py(e,t){return"w-e-element-".concat(e,"-").concat(t)}var hy=[];var gy,vy,my={};function yy(e,t,n){var r=n.isInline(e)?"span":"div";return"<".concat(r,">").concat(t,"</").concat(r,">")}function by(e,t){var n=e.type,r=void 0===n?"":n,o=e.children,i=void 0===o?[]:o,a=mh.isVoid(t,e),s="";a||(s=i.map(function(e){return Py(e,t)}).join(""));var u=function(e){return my[e]||yy}(r),l=u(e,s,t),c="";if(c="string"==typeof l?l:l.html||"",a||hy.forEach(function(t){return c=t(e,c)}),"string"==typeof l)return c;var d=l.prefix,f=void 0===d?"":d,p=l.suffix,h=void 0===p?"":p;return f&&(c=f+c),h&&(c+=h),c}var Ey=function(){if(vy)return gy;vy=1;var e=9007199254740991,t="[object Arguments]",n="[object Map]",r="[object Promise]",o="[object Set]",i="[object WeakMap]",a="[object DataView]",s=/^\[object .+?Constructor\]$/,u=/^(?:0|[1-9]\d*)$/,l="\\ud800-\\udfff",c="\\u0300-\\u036f\\ufe20-\\ufe23",d="\\u20d0-\\u20f0",f="\\ufe0e\\ufe0f",p="["+l+"]",h="["+c+d+"]",g="\\ud83c[\\udffb-\\udfff]",v="[^"+l+"]",m="(?:\\ud83c[\\udde6-\\uddff]){2}",b="[\\ud800-\\udbff][\\udc00-\\udfff]",E="\\u200d",w="(?:"+h+"|"+g+")"+"?",C="["+f+"]?",D=C+w+("(?:"+E+"(?:"+[v,m,b].join("|")+")"+C+w+")*"),A="(?:"+[v+h+"?",h,m,b,p].join("|")+")",S=RegExp(g+"(?="+g+")|"+A+D,"g"),O=RegExp("["+E+l+c+d+f+"]"),x="object"==typeof y&&y&&y.Object===Object&&y,N="object"==typeof self&&self&&self.Object===Object&&self,B=x||N||Function("return this")();function T(e,t){return function(e,t){for(var n=-1,r=e?e.length:0,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}(t,function(t){return e[t]})}function k(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function F(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function I(e){return function(e){return O.test(e)}(e)?function(e){return e.match(S)||[]}(e):function(e){return e.split("")}(e)}var P,R,_=Function.prototype,L=Object.prototype,M=B["__core-js_shared__"],j=function(){var e=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),H=_.toString,z=L.hasOwnProperty,$=L.toString,U=RegExp("^"+H.call(z).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),V=B.Symbol,W=V?V.iterator:void 0,G=L.propertyIsEnumerable,q=(P=Object.keys,R=Object,function(e){return P(R(e))}),K=se(B,"DataView"),Y=se(B,"Map"),X=se(B,"Promise"),Z=se(B,"Set"),J=se(B,"WeakMap"),Q=ce(K),ee=ce(Y),te=ce(X),ne=ce(Z),re=ce(J);function oe(e,n){var r=de(e)||function(e){return function(e){return ge(e)&&fe(e)}(e)&&z.call(e,"callee")&&(!G.call(e,"callee")||$.call(e)==t)}(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],o=r.length,i=!!o;for(var a in e)!z.call(e,a)||i&&("length"==a||le(a,o))||r.push(a);return r}function ie(e){if(!he(e)||function(e){return!!j&&j in e}(e))return!1;var t=pe(e)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e)?U:s;return t.test(ce(e))}function ae(e){if(n=(t=e)&&t.constructor,r="function"==typeof n&&n.prototype||L,t!==r)return q(e);var t,n,r,o=[];for(var i in Object(e))z.call(e,i)&&"constructor"!=i&&o.push(i);return o}function se(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return ie(n)?n:void 0}var ue=function(e){return $.call(e)};function le(t,n){return!!(n=null==n?e:n)&&("number"==typeof t||u.test(t))&&t>-1&&t%1==0&&t<n}function ce(e){if(null!=e){try{return H.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(K&&ue(new K(new ArrayBuffer(1)))!=a||Y&&ue(new Y)!=n||X&&ue(X.resolve())!=r||Z&&ue(new Z)!=o||J&&ue(new J)!=i)&&(ue=function(e){var t=$.call(e),s="[object Object]"==t?e.constructor:void 0,u=s?ce(s):void 0;if(u)switch(u){case Q:return a;case ee:return n;case te:return r;case ne:return o;case re:return i}return t});var de=Array.isArray;function fe(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=e}(t.length)&&!pe(t)}function pe(e){var t=he(e)?$.call(e):"";return"[object Function]"==t||"[object GeneratorFunction]"==t}function he(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function ge(e){return!!e&&"object"==typeof e}function ve(e){return e?T(e,function(e){return fe(e)?oe(e):ae(e)}(e)):[]}return gy=function(e){if(!e)return[];if(fe(e))return function(e){return"string"==typeof e||!de(e)&&ge(e)&&"[object String]"==$.call(e)}(e)?I(e):function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(e);if(W&&e[W])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[W]());var t=ue(e);return(t==n?k:t==o?F:ve)(e)},gy}(),wy=b(Ey),Cy=0,Dy=function(){this.id="".concat(Cy++)},Ay="undefined"!=typeof navigator&&/Mac OS X/.test(navigator.userAgent),Sy="undefined"!=typeof navigator&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Oy="undefined"!=typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),xy="undefined"!=typeof navigator&&/Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent),Ny="undefined"!=typeof navigator&&/Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent),By="undefined"!=typeof navigator&&/Chrome/i.test(navigator.userAgent),Ty=!Ny&&!xy&&"undefined"!=typeof globalThis&&globalThis.InputEvent&&"function"==typeof globalThis.InputEvent.prototype.getTargetRanges,ky=function(e,t){return Boolean(e.compareDocumentPosition(t)&Lm.DOCUMENT_POSITION_PRECEDING)},Fy=function(e,t){return Boolean(e.compareDocumentPosition(t)&Lm.DOCUMENT_POSITION_FOLLOWING)},Iy={getWindow:function(e){var t=Fv.get(e);if(!t)throw new Error("Unable to find a host window element for this editor");return t},findKey:function(e,t){var n=kv.get(t);return n||(n=new Dy,kv.set(t,n)),n},setNewKey:function(e){var t=new Dy;kv.set(e,t)},findPath:function(e,t){for(var n=[],r=t;;){var o=Ov.get(r);if(null==o){if(mh.isEditor(r))return n;break}var i=Sv.get(r);if(null==i)break;n.unshift(i),r=o}throw new Error("Unable to find the path for Slate node: ".concat(JSON.stringify(t)))},findDocumentOrShadowRoot:function(e){if(e.isDestroyed)return window.document;var t=Iy.toDOMNode(e,e),n=t.getRootNode();return"[object HTMLDocument]"!==_m(n)&&!function(e){return"[object ShadowRoot]"===_m(e)}(n)||null==Reflect.get(n,"getSelection")?t.ownerDocument:n},getParentNode:function(e,t){return Ov.get(t)||null},getParentsNodes:function(e,t){for(var n=[],r=t;r!==e&&null!=r;){var o=Iy.getParentNode(e,r);if(null==o)break;n.push(o),r=o}return n},getTopNode:function(e,t){var n=[Iy.findPath(e,t)[0]];return _p.get(e,n)},toDOMNode:function(e,t){var n;if(mh.isEditor(t))n=xv.get(e);else{var r=Iy.findKey(e,t);n=Bv.get(r)}if(!n)throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(t)));return n},hasDOMNode:function(e,t,n){void 0===n&&(n={});var r,o=n.editable,i=void 0!==o&&o,a=Iy.toDOMNode(e,e);try{r=$m(t)?t:t.parentElement}catch(e){if(e instanceof Error&&!e.message.includes('Permission denied to access property "nodeType"'))throw e}return!!r&&(r.closest("[data-slate-editor]")===a&&(!i||r.isContentEditable||r.closest('[contenteditable="false"]')===a||!!r.getAttribute("data-slate-zero-width"))||!!r.getAttribute("data-slate-string"))},toDOMRange:function(e,t){var n=t.anchor,r=t.focus,o=Bp.isBackward(t),i=Iy.toDOMPoint(e,n),a=Bp.isCollapsed(t)?i:Iy.toDOMPoint(e,r),s=Iy.getWindow(e).document.createRange(),u=Lg(o?a:i,2),l=u[0],c=u[1],d=Lg(o?i:a,2),f=d[0],p=d[1],h=!!($m(l)?l:l.parentElement).getAttribute("data-slate-zero-width"),g=!!($m(f)?f:f.parentElement).getAttribute("data-slate-zero-width");return s.setStart(l,h?1:c),s.setEnd(f,g?1:p),s},toDOMPoint:function(e,t){var n,r,o,i=Lg(mh.node(e,t.path),1)[0],a=Iy.toDOMNode(e,i);mh.void(e,{at:t})&&(t={path:t.path,offset:0});var s=Array.from(a.querySelectorAll("[data-slate-string], [data-slate-zero-width]")),u=0;try{for(var l=_g(s),c=l.next();!c.done;c=l.next()){var d=c.value,f=d.childNodes[0];if(null!=f&&null!=f.textContent){var p=f.textContent.length,h=d.getAttribute("data-slate-length"),g=u+(null==h?p:parseInt(h,10));if(t.offset<=g){o=[f,Math.min(p,Math.max(0,t.offset-u))];break}u=g}}}catch(e){n={error:e}}finally{try{c&&!c.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}if(!o)throw new Error("Cannot resolve a DOM point from Slate point: ".concat(JSON.stringify(t)));return o},toSlateNode:function(e,t){var n=$m(t)?t:t.parentElement;n&&!n.hasAttribute("data-slate-node")&&(n=n.closest("[data-slate-node]"));var r=n?Nv.get(n):null;if(!r)throw new Error("Cannot resolve a Slate node from DOM node: ".concat(n));return r},findEventRange:function(e,t){"nativeEvent"in t&&(t=t.nativeEvent);var n=t.clientX,r=t.clientY,o=t.target;if(null==n||null==r)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));var i,a=Iy.toSlateNode(e,t.target),s=Iy.findPath(e,a);if(kp.isElement(a)&&mh.isVoid(e,a)){var u=o.getBoundingClientRect(),l=e.isInline(a)?n-u.left<u.left+u.width-n:r-u.top<u.top+u.height-r,c=mh.point(e,s,{edge:l?"start":"end"}),d=l?mh.before(e,c):mh.after(e,c);if(d)return mh.range(e,d)}var f=this.getWindow(e).document;if(f.caretRangeFromPoint)i=f.caretRangeFromPoint(n,r);else{var p=f.caretPositionFromPoint(n,r);p&&((i=f.createRange()).setStart(p.offsetNode,p.offset),i.setEnd(p.offsetNode,p.offset))}if(!i)throw new Error("Cannot resolve a Slate range from a DOM event: ".concat(t));return Iy.toSlateRange(e,i,{exactMatch:!1,suppressThrow:!1})},toSlateRange:function(e,t,n){var r,o,i,a,s,u=n.exactMatch,l=n.suppressThrow;if((Um(t)?t.anchorNode:t.startContainer)&&(Um(t)?(r=t.anchorNode,o=t.anchorOffset,i=t.focusNode,a=t.focusOffset,s=By&&window.document.activeElement&&window.document.activeElement.shadowRoot?t.anchorNode===t.focusNode&&t.anchorOffset===t.focusOffset:t.isCollapsed):(r=t.startContainer,o=t.startOffset,i=t.endContainer,a=t.endOffset,s=t.collapsed)),null==r||null==i||null==o||null==a)throw new Error("Cannot resolve a Slate range from DOM range: ".concat(t));var c=Iy.toSlatePoint(e,[r,o],{exactMatch:u,suppressThrow:l});if(!c)return null;var d=s?c:Iy.toSlatePoint(e,[i,a],{exactMatch:u,suppressThrow:l,searchDirection:ky(r,i)||r===i&&a<o?"forward":"backward"});if(!d)return null;var f={anchor:c,focus:d};return Bp.isExpanded(f)&&Bp.isForward(f)&&$m(i)&&mh.void(e,{at:f.focus,mode:"highest"})&&(f=mh.unhangRange(e,f,{voids:!0})),f},toSlatePoint:function(e,t,n){var r,o,i,a=n.exactMatch,s=n.suppressThrow,u=Lg(a?t:function(e){var t,n=Lg(e,2),r=n[0],o=n[1];if($m(r)&&r.childNodes.length){var i=o===r.childNodes.length,a=i?o-1:o;for(r=(t=Lg(Gm(r,a,i?"backward":"forward"),2))[0],i=(a=t[1])<o;$m(r)&&r.childNodes.length;){var s=i?r.childNodes.length-1:0;r=qm(r,s,i?"backward":"forward")}o=i&&null!=r.textContent?r.textContent.length:0}return[r,o]}(t),2),l=u[0],c=u[1],d=l.parentNode,f=n.searchDirection,p=null,h=0;if(d){var g=Iy.toDOMNode(e,e),v=d.closest('[data-slate-void="true"]'),m=v&&g.contains(v)?v:null,y=d.closest('[contenteditable="false"]'),b=y&&g.contains(y)?y:null,E=d.closest("[data-slate-leaf]"),w=null,C=Iy.getWindow(e);if(E&&C.document.createRange){p=E.closest('[data-slate-node="text"]');var D=C.document.createRange();D.setStart(p,0),D.setEnd(l,c);var A=D.cloneContents();Mg(Mg([],Lg(wy(A.querySelectorAll("[data-slate-zero-width]"))),!1),Lg(wy(A.querySelectorAll("[contenteditable=false]"))),!1).forEach(function(e){e.parentNode.removeChild(e)}),h=A.textContent.length,w=p}else if(m)E=Array.from(m.querySelectorAll("[data-slate-leaf]")).find(function(t){return Iy.hasDOMNode(e,t)})||null,E?(p=E.closest('[data-slate-node="text"]'),h=(w=E).textContent.length,w.querySelectorAll("[data-slate-zero-width]").forEach(function(e){h-=e.textContent.length})):h=1;else if(b){var S=function(t){return t?Array.from(t.querySelectorAll("[data-slate-leaf]")).filter(function(t){return Iy.hasDOMNode(e,t)}):[]},O=b.closest('[data-slate-node="element"]');if("backward"===f||!f)for(var x=(B=Mg(Mg([],Lg(S(null==O?void 0:O.previousElementSibling)),!1),Lg(S(O)),!1)).length-1;x>=0;x-=1){var N=B[x];if(ky(b,N)){E=N,f="backward";break}}if(!(E||"forward"!==f&&f)){var B=Mg(Mg([],Lg(S(O)),!1),Lg(S(null==O?void 0:O.nextElementSibling)),!1);try{for(var T=_g(B),k=T.next();!k.done;k=T.next()){N=k.value;if(Fy(b,N)){E=N,f="forward";break}}}catch(e){r={error:e}}finally{try{k&&!k.done&&(o=T.return)&&o.call(T)}finally{if(r)throw r.error}}}E&&(p=E.closest('[data-slate-node="text"]'),w=E,"forward"===f?h=0:(h=w.textContent.length,w.querySelectorAll("[data-slate-zero-width]").forEach(function(e){h-=e.textContent.length})))}w&&h===w.textContent.length&&(d.hasAttribute("data-slate-zero-width")||Sy&&(null===(i=w.textContent)||void 0===i?void 0:i.endsWith("\n")))&&(h-=1)}if(!p){if(s)return null;throw new Error("Cannot resolve a Slate point from DOM point: ".concat(t))}var F,I=Iy.toSlateNode(e,p);try{F=Iy.findPath(e,I)}catch(e){if(s)return null;throw e}return{path:F,offset:h}},hasRange:function(e,t){var n=t.anchor,r=t.focus;return mh.hasPath(e,n.path)&&mh.hasPath(e,r.path)},getNodeType:function(e){return kp.isElement(e)?e.type:""},checkNodeType:function(e,t){return this.getNodeType(e)===t},getNodesStr:function(e){return e.map(function(e){return _p.string(e)}).join("")},getSelectedElems:function(e){var t,n,r=[],o=mh.nodes(e,{universal:!0});try{for(var i=_g(o),a=i.next();!a.done;a=i.next()){var s=Lg(a.value,1)[0];kp.isElement(s)&&r.push(s)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},getSelectedNodeByType:function(e,t){var n=this,r=Lg(mh.nodes(e,{match:function(e){return n.checkNodeType(e,t)},universal:!0}),1),o=r[0];return null==o?null:o[0]},getSelectedTextNode:function(e){var t=Lg(mh.nodes(e,{match:function(e){return Nh.isText(e)},universal:!0}),1),n=t[0];return null==n?null:n[0]},isNodeSelected:function(e,t){var n=Lg(mh.nodes(e,{match:function(e){return e===t},universal:!0}),1),r=n[0];return null!=r&&Lg(r,1)[0]===t},isSelectionAtLineEnd:function(e,t){var n=e.selection;return!!n&&(mh.isEnd(e,n.anchor,t)||mh.isEnd(e,n.focus,t))},getTextarea:function(e){var t=cv.get(e);if(null==t)throw new Error("Cannot find textarea instance by editor");return t},getToolbar:function(e){return pv.get(e)||null},getHoverbar:function(e){return gv.get(e)||null},normalizeContent:function(e){e.children.forEach(function(t,n){e.normalizeNode([t,[n]])})},getLeftLengthOfMaxLength:function(e){var t=e.getConfig(),n=t.maxLength,r=t.onMaxLength;if("number"!=typeof n||n<=0)return 1/0;var o=n-e.getText().replace(/\r|\n|(\r\n)|(\n\r)/g,"").length;return o<=0&&r&&r(e),o},cleanExposedTexNodeInSelectionBlock:function(e){var t,n,r,o,i=Iy.getTextarea(e).$textArea,a=null==i?void 0:i[0].childNodes;if(a)try{for(var s=_g(Array.from(a)),u=s.next();!u.done;u=s.next()){var l=u.value;if(!Vm(l))break;l.remove()}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}var c=mh.nodes(e,{match:function(t){return!(!kp.isElement(t)||e.isInline(t))},universal:!0});try{for(var d=_g(c),f=d.next();!f.done;f=d.next()){var p=f.value;if(null!=p){var h=p[0];Ym(Iy.toDOMNode(e,h),function(e,t){var n=Zv(t);n.attr("data-slate-string")||n.attr("data-slate-zero-width")||n.attr("data-w-e-reserve")||t.removeChild(e)})}}}catch(e){r={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}},isLastNode:function(e,t){var n=e.children||[];return n[n.length-1]===t},genEmptyParagraph:function(){return{type:"paragraph",children:[{text:""}]}},isSelectedVoidNode:function(e){var t,n,r=mh.nodes(e,{match:function(t){return e.isVoid(t)}}),o=0;try{for(var i=_g(r),a=i.next();!a.done;a=i.next()){a.value&&(o+=1)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return o>0},isSelectedEmptyParagraph:function(e){var t=e.selection;if(null==t)return!1;if(Bp.isExpanded(t))return!1;var n=Iy.getSelectedNodeByType(e,"paragraph");if(null===n)return!1;var r=n.children;return 1===r.length&&(""===r[0].text||void 0)},isEmptyPath:function(e,t){var n=mh.node(e,t);if(null==n)return!1;var r=Lg(n,1)[0].children;if(1===r.length&&""===r[0].text)return!0;return!1}};function Py(e,t){return kp.isElement(e)?by(e,t):function(e,t){var n=e.text;if(null==n)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=n;r=function(e){return e.replace(/ {2}/g," ").replace(/</g,"<").replace(/>/g,">").replace(/®/g,"®").replace(/©/g,"©").replace(/™/g,"™")}(r);var o=Iy.getParentsNodes(t,e).some(function(e){return"pre"===Iy.getNodeType(e)});if(o||(r=r.replace(/\n\r|\r\n|\r|\n/g,"<br>")),o&&(r=r.replace(/ /g," ")),""===r){var i=Iy.getParentNode(null,e);if(!i||0!==i.children.length)return r;r="<br>"}return hy.forEach(function(t){return r=t(e,r)}),r}(e,t)}var Ry=function(e,t){var n=(t.top+t.bottom)/2;return e.top<=n&&e.bottom>=n},_y=function(e,t,n){var r=Iy.toDOMRange(e,t).getBoundingClientRect(),o=Iy.toDOMRange(e,n).getBoundingClientRect();return Ry(r,o)&&Ry(o,r)},Ly=function(e,t){var n,r,o=[];try{for(var i=_g(mh.levels(e,{at:t})),a=i.next();!a.done;a=i.next()){var s=Lg(a.value,2),u=s[0],l=s[1],c=Iy.findKey(e,u);o.push([l,c])}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o};function My(e,t){e.isInline(t)?(e.insertNode(t),"link"===t.type&&e.insertFragment([{text:""}])):Wh.insertNodes(e,t,{mode:"highest"})}var jy,Hy,zy,$y,Uy,Vy,Wy,Gy,qy,Ky,Yy,Xy,Zy,Jy,Qy,eb,tb,nb,rb,ob,ib,ab,sb,ub,lb,cb,db,fb,pb,hb,gb,vb,mb,yb,bb,Eb,wb,Cb,Db,Ab,Sb=function(e){var t=e,n=t.onChange,r=t.insertText,o=t.apply,i=t.deleteBackward,a=t.deleteFragment;return t.insertText=function(e){t.getConfig().readOnly||r(e)},t.apply=function(e){var n,r,i,a,s,u,l,c,d=[];switch(e.type){case"insert_text":case"remove_text":case"set_node":case"split_node":d.push.apply(d,Mg([],Lg(Ly(t,e.path)),!1));break;case"insert_node":case"remove_node":d.push.apply(d,Mg([],Lg(Ly(t,Cp.parent(e.path))),!1));break;case"merge_node":var f=Cp.previous(e.path);d.push.apply(d,Mg([],Lg(Ly(t,f)),!1));break;case"move_node":var p=Cp.common(Cp.parent(e.path),Cp.parent(e.newPath));d.push.apply(d,Mg([],Lg(Ly(t,p)),!1));break;case"set_selection":(null===(a=null===(i=e.newProperties)||void 0===i?void 0:i.focus)||void 0===a?void 0:a.path)&&(d.push.apply(d,Mg([],Lg(Ly(t,null===(u=null===(s=e.newProperties)||void 0===s?void 0:s.focus)||void 0===u?void 0:u.path)),!1)),d.push.apply(d,Mg([],Lg(Ly(t,null===(c=null===(l=e.properties)||void 0===l?void 0:l.focus)||void 0===c?void 0:c.path)),!1)))}o(e);try{for(var h=_g(d),g=h.next();!g.done;g=h.next()){var v=Lg(g.value,2),m=v[0],y=v[1],b=Lg(mh.node(t,m),1)[0];kv.set(b,y),"type"in b&&(Dv.has(b)&&Dv.delete(b),Av.has(b)&&Av.delete(b))}}catch(e){n={error:e}}finally{try{g&&!g.done&&(r=h.return)&&r.call(h)}finally{if(n)throw n.error}}},t.deleteBackward=function(n){if("line"!==n)return i(n);if(e.selection&&Bp.isCollapsed(e.selection)){var r=mh.above(e,{match:function(t){return kp.isElement(t)&&mh.isBlock(e,t)},at:e.selection});if(r){var o=Lg(r,2)[1],a=mh.range(e,o,e.selection.anchor),s=function(e,t){var n=mh.range(e,Bp.end(t)),r=Array.from(mh.positions(e,{at:t})),o=0,i=r.length,a=Math.floor(i/2);if(_y(e,mh.range(e,r[o]),n))return mh.range(e,r[o],n);if(r.length<2)return mh.range(e,r[r.length-1],n);for(;a!==r.length&&a!==o;)_y(e,mh.range(e,r[a]),n)?i=a:o=a,a=Math.floor((o+i)/2);return mh.range(e,r[i],n)}(t,a);Bp.isCollapsed(s)||Wh.delete(e,{at:s})}}},t.deleteFragment=function(e){var n=function(e){var t=e.selection;if(null==t||Bp.isCollapsed(t))return!1;var n=Lg(Bp.edges(t),2),r=n[0],o=n[1],i=Lg(mh.edges(e,[]),2),a=i[0],s=i[1];return wh.equals(r,a)&&wh.equals(o,s)}(t);a(e),n&&(!function(e){var t=[{type:"paragraph",children:[{text:""}]}];mh.withoutNormalizing(e,function(){for(var n=e.children.length-1;n>=0;n-=1)Wh.removeNodes(e,{at:[n]});Wh.insertNodes(e,t,{at:[0]})})}(t),t.children.length>0&&Wh.select(t,mh.start(t,[])))},t.onChange=function(){var e=t.selection;null!=e&&Pv.set(t,e),t.emit(nv),n()},t.handleTab=function(){t.insertText(" ")},t.getHtml=function(){var e=t.children,n=void 0===e?[]:e,r=t.getConfig().skipCacheTypes,o=void 0===r?["list-item"]:r;return n.map(function(e){var n=Iy.getNodeType(e);if(o.includes(n))return Py(e,t);var r=Av.get(e);if(r)return r;var i=Py(e,t);return Av.set(e,i),i}).join("")},t.getText=function(){var e=t.children;return(void 0===e?[]:e).map(function(e){return _p.string(e)}).join("\n")},t.getSelectionText=function(){var n=t.selection;return null==n?"":mh.string(e,n)},t.getElemsByType=function(e,n){var r,o;void 0===n&&(n=!1);var i=[],a=mh.nodes(t,{at:[],universal:!0});try{for(var s=_g(a),u=s.next();!u.done;u=s.next()){var l=Lg(u.value,1)[0];if(kp.isElement(l))if(n?l.type.indexOf(e)>=0:l.type===e){var c=Iy.findKey(t,l),d=py(l.type,c.id);i.push(Ig(Ig({},l),{id:d}))}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=s.return)&&o.call(s)}finally{if(r)throw r.error}}return i},t.getElemsByTypePrefix=function(e){return t.getElemsByType(e,!0)},t.isEmpty=function(){var e=t.children,n=void 0===e?[]:e;if(n.length>1)return!1;var r=n[0];if(null==r)return!0;if(!kp.isElement(r)||"paragraph"!==r.type)return!1;var o=r.children,i=void 0===o?[]:o;if(i.length>1)return!1;var a=i[0];return null==a||Nh.isText(a)&&""===a.text},t.clear=function(){Wh.delete(t,{at:{anchor:mh.start(t,[]),focus:mh.end(t,[])}}),0!==t.children.length?function(e){var t=e.children[0];if(1===e.children.length&&kp.isElement(t)&&("paragraph"!==t.type||""!==_p.string(t))&&""===_p.string(t)){var n=[{type:"paragraph",children:[{text:""}]}];mh.withoutNormalizing(e,function(){Wh.removeNodes(e,{at:[0]}),Wh.insertNodes(e,n,{at:[0]})})}}(t):Wh.insertNodes(t,[{type:"paragraph",children:[{text:""}]}])},t.getParentNode=function(e){return Iy.getParentNode(t,e)},t.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e){var r=document.createElement("div");r.innerHTML=e;var o=Array.from(r.childNodes);if(o=o.filter(function(e){var t=e.nodeName;return!!Vm(e)||!!$m(e)&&!Hv.has(t.toLowerCase())}),0!==o.length){var i=t.selection;if(null!=i){var a=null;if(Iy.isSelectedEmptyParagraph(t)&&!n)a=[i.focus.path[0]];r.setAttribute("hidden","true"),document.body.appendChild(r);var s=0;o.forEach(function(e,n){var r=e.nodeName,i=e.textContent,a=void 0===i?"":i;if(Vm(e)){if(!a||!a.trim())return;t.insertNode({text:a})}else if("BR"!==r){var u=e,l=!1;if(Qm.includes(r.toLowerCase()))l=!0;else for(var c in ny)if(u.matches(c)){l=!0;break}if(l){var d=cy(Zv(u),t);return Array.isArray(d)?(d.forEach(function(e){return My(t,e)}),s+=1):(My(t,d),s+=1),void(Iy.isSelectedVoidNode(t)&&t.move(1))}var f=window.getComputedStyle(u).display;if(!Iy.isSelectedEmptyParagraph(t)&&f.indexOf("inline")<0){if(n>=1)(function(e){return"matches"in e&&/^[ou]l$/i.test(e.tagName)&&!e.hasAttribute("data-w-e-type")})(o[n-1])&&t.insertBreak();t.insertBreak()}t.dangerouslyInsertHtml(u.innerHTML,!0)}else t.insertText("\n")}),s&&a&&Iy.isEmptyPath(t,a)&&Wh.removeNodes(t,{at:a}),r.remove()}}}},t.setHtml=function(e){void 0===e&&(e="");var n=t.isDisabled(),r=t.isFocused(),o=JSON.stringify(t.selection);t.enable(),Pv.delete(t),t.focus(),t.clear();var i=fy(t,null==e?"":e);if(Wh.insertFragment(t,i),r||(t.deselect(),t.blur()),n&&(t.deselect(),t.disable()),t.isFocused())try{var a=JSON.parse(o);Bp.isRange(a)&&Iy.hasRange(t,a)?t.select(a):t.select(mh.start(t,[]))}catch(e){t.select(mh.start(t,[]))}},t},Ob=1,xb=function(e){var t=e;return t.id="wangEditor-".concat(Ob),Ob+=1,t.isDestroyed=!1,t.isFullScreen=!1,t.focus=function(e){if(Iy.toDOMNode(t,t).focus({preventScroll:!0}),Iv.set(t,!0),e){var n=mh.end(t,[]);Wh.select(t,n)}else{var r=Pv.get(t);r?Wh.select(t,r):Wh.select(t,mh.start(t,[]))}},t.isFocused=function(){return!!Iv.get(t)},t.blur=function(){Iy.toDOMNode(t,t).blur(),Wh.deselect(t),Iv.set(t,!1)},t.updateView=function(){Iy.getTextarea(t).changeViewState();var e=Iy.getToolbar(t);e&&e.changeToolbarState();var n=Iy.getHoverbar(t);n&&n.changeHoverbarState()},t.destroy=function(){if(!t.isDestroyed){var e=Iy.getTextarea(t);e.destroy(),cv.delete(t),dv.delete(e);var n=Iy.getToolbar(t);n&&(n.destroy(),pv.delete(t),fv.delete(n));var r=Iy.getHoverbar(t);r&&(r.destroy(),gv.delete(t),hv.delete(r)),t.isDestroyed=!0,t.emit(tv)}},t.scrollToElem=function(e){if(!t.getConfig().scroll){var n="编辑器禁用了 scroll ,编辑器内容无法滚动,请自行实现该功能";return n+="\nYou has disabled editor scroll, please do this yourself",void console.warn(n)}var r=Zv("#".concat(e));if(0!==r.length){var o=r[0];if(!Iy.hasDOMNode(t,o)){n="Element (found by id is '".concat(e,"') is not in editor DOM");return n+="\n 通过 id '".concat(e,"' 找到的 element 不在 editor DOM 之内"),void console.error(n,o)}var i=Iy.getTextarea(t),a=i.$textAreaContainer,s=i.$scroll,u=r.offset().top,l=a.offset().top;s[0].scrollBy({top:u-l,behavior:"smooth"})}},t.showProgressBar=function(e){e<1||Iy.getTextarea(t).changeProgress(e)},t.hidePanelOrModal=function(){var e=mv.get(t);null!=e&&e.forEach(function(e){return e.hide()})},t.enable=function(){t.getConfig().readOnly=!1,t.updateView()},t.disable=function(){t.getConfig().readOnly=!0,t.updateView()},t.isDisabled=function(){return t.getConfig().readOnly},t.toDOMNode=function(e){return Iy.toDOMNode(t,e)},t.fullScreen=function(){if(!t.isFullScreen){var e=null,n=Iy.getToolbar(t);n&&(e=n.$box);var r=Iy.getTextarea(t).$box.parent();if(e&&e.parent()[0]!==r[0]){throw new Error("Can not set full screen, cause toolbar DOM parent is not equal to textarea DOM parent\n不能设置全屏,因为 toolbar DOM 父节点和 textarea DOM 父节点不一致")}r.addClass("w-e-full-screen-container");var o=r.css("z-index");r.attr("data-z-index",o.toString()),t.isFullScreen=!0,t.emit(ov)}},t.unFullScreen=function(){if(t.isFullScreen){var e=Iy.getTextarea(t).$box.parent();setTimeout(function(){e.removeClass("w-e-full-screen-container"),t.isFullScreen=!1,t.emit(iv)},200)}},t.getEditableContainer=function(){return Iy.getTextarea(t).$textAreaContainer[0]},t},Nb={exports:{}},Bb={exports:{}};function Tb(){if(Hy)return jy;Hy=1;return jy=function(e){return null!=e}}function kb(){if(Vy)return Uy;Vy=1;var e=function(){if($y)return zy;$y=1;var e=Tb(),t={object:!0,function:!0,undefined:!0};return zy=function(n){return!!e(n)&&hasOwnProperty.call(t,typeof n)}}();return Uy=function(t){if(!e(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(e){return!1}}}function Fb(){if(Ky)return qy;Ky=1;var e=function(){if(Gy)return Wy;Gy=1;var e=kb();return Wy=function(t){if("function"!=typeof t)return!1;if(!hasOwnProperty.call(t,"length"))return!1;try{if("number"!=typeof t.length)return!1;if("function"!=typeof t.call)return!1;if("function"!=typeof t.apply)return!1}catch(e){return!1}return!e(t)}}(),t=/^\s*class[\s{/}]/,n=Function.prototype.toString;return qy=function(r){return!!e(r)&&!t.test(n.call(r))}}function Ib(){if(nb)return tb;nb=1;var e=(eb?Qy:(eb=1,Qy=function(){}))();return tb=function(t){return t!==e&&null!==t},tb}function Pb(){return ab||(ab=1,ib=(Jy?Zy:(Jy=1,Zy=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}))()?Object.keys:function(){if(ob)return rb;ob=1;var e=Ib(),t=Object.keys;return rb=function(n){return t(e(n)?Object(n):n)}}()),ib}function Rb(){if(cb)return lb;cb=1;var e=Pb(),t=function(){if(ub)return sb;ub=1;var e=Ib();return sb=function(t){if(!e(t))throw new TypeError("Cannot use null or undefined");return t}}(),n=Math.max;return lb=function(r,o){var i,a,s,u=n(arguments.length,2);for(r=Object(t(r)),s=function(e){try{r[e]=o[e]}catch(e){i||(i=e)}},a=1;a<u;++a)e(o=arguments[a]).forEach(s);if(void 0!==i)throw i;return r},lb}function _b(){return fb?db:(fb=1,db=(Xy||(Xy=1,Yy=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}),Yy)()?Object.assign:Rb())}function Lb(){return Eb||(Eb=1,bb=function(){if(vb)return gb;vb=1;var e="razdwatrzy";return gb=function(){return"function"==typeof e.contains&&!0===e.contains("dwa")&&!1===e.contains("foo")}}()()?String.prototype.contains:function(){if(yb)return mb;yb=1;var e=String.prototype.indexOf;return mb=function(t){return e.call(this,t,arguments[1])>-1},mb}()),bb}function Mb(){if(wb)return Bb.exports;wb=1;var e=Tb(),t=Fb(),n=_b(),r=function(){if(hb)return pb;hb=1;var e=Ib(),t=Array.prototype.forEach,n=Object.create;return pb=function(r){var o=n(null);return t.call(arguments,function(t){e(t)&&function(e,t){var n;for(n in e)t[n]=e[n]}(Object(t),o)}),o},pb}(),o=Lb(),i=Bb.exports=function(t,i){var a,s,u,l,c;return arguments.length<2||"string"!=typeof t?(l=i,i=t,t=null):l=arguments[2],e(t)?(a=o.call(t,"c"),s=o.call(t,"e"),u=o.call(t,"w")):(a=u=!0,s=!1),c={value:i,configurable:a,enumerable:s,writable:u},l?n(r(l),c):c};return i.gs=function(i,a,s){var u,l,c,d;return"string"!=typeof i?(c=s,s=a,a=i,i=null):c=arguments[3],e(a)?t(a)?e(s)?t(s)||(c=s,s=void 0):s=void 0:(c=a,a=s=void 0):a=void 0,e(i)?(u=o.call(i,"c"),l=o.call(i,"e")):(u=!0,l=!1),d={get:a,set:s,configurable:u,enumerable:l},c?n(r(c),d):d},Bb.exports}var jb=(Ab||(Ab=1,function(e,t){var n,r,o,i,a,s,u,l=Mb(),c=Db?Cb:(Db=1,Cb=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}),d=Function.prototype.apply,f=Function.prototype.call,p=Object.create,h=Object.defineProperty,g=Object.defineProperties,v=Object.prototype.hasOwnProperty,m={configurable:!0,enumerable:!1,writable:!0};n=function(e,t){var n;return c(t),v.call(this,"__ee__")?n=this.__ee__:(n=m.value=p(null),h(this,"__ee__",m),m.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},r=function(e,t){var r,i;return c(t),i=this,n.call(this,e,r=function(){o.call(i,e,r),d.call(t,this,arguments)}),r.__eeOnceListener__=t,this},o=function(e,t){var n,r,o,i;if(c(t),!v.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(r=n[e]))for(i=0;o=r[i];++i)o!==t&&o.__eeOnceListener__!==t||(2===r.length?n[e]=r[i?0:1]:r.splice(i,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},i=function(e){var t,n,r,o,i;if(v.call(this,"__ee__")&&(o=this.__ee__[e]))if("object"==typeof o){for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];for(o=o.slice(),t=0;r=o[t];++t)d.call(r,this,i)}else switch(arguments.length){case 1:f.call(o,this);break;case 2:f.call(o,this,arguments[1]);break;case 3:f.call(o,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,i=new Array(n-1),t=1;t<n;++t)i[t-1]=arguments[t];d.call(o,this,i)}},a={on:n,once:r,off:o,emit:i},s={on:l(n),once:l(r),off:l(o),emit:l(i)},u=g({},s),e.exports=t=function(e){return null==e?p(u):g(Object(e),s)},t.methods=a}(Nb,Nb.exports)),Nb.exports),Hb=b(jb);function zb(e){var t=Rv.get(e);return null==t&&(t=Hb(),Rv.set(e,t)),t}var $b=new WeakMap;function Ub(e,t){var n=$b.get(e);null==n&&(n=new Set,$b.set(e,n)),n.add(t)}var Vb=function(e){var t=e;return t.on=function(e,n){var r=zb(t);if(r.on(e,n),"destroyed"===e&&Ub(t,n),"destroyed"!==e){var o=function(){return r.off(e,n)};r.on("destroyed",o),Ub(t,o)}},t.once=function(e,n){zb(t).once(e,n)},t.off=function(e,n){zb(t).off(e,n)},t.emit=function(e){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var o=zb(t);if(o.emit.apply(o,Mg([e],Lg(n),!1)),"destroyed"===e){var i=function(e){return $b.get(e)||new Set}(t);i.forEach(function(e){return o.off("destroyed",e)}),function(e){$b.set(e,new Set)}(t)}},t};var Wb=function(e){var t=e;return t.setFragmentData=function(e){var n=t.selection;if(n){var r=Lg(Bp.edges(n),2),o=r[0],i=r[1],a=mh.void(t,{at:o.path}),s=mh.void(t,{at:i.path});if(!Bp.isCollapsed(n)||a){var u=Iy.toDOMRange(t,n),l=u.cloneContents(),c=l.childNodes[0];if(l.childNodes.forEach(function(e){e.textContent&&""!==e.textContent.trim()&&(c=e)}),s){var d=Lg(s,1)[0],f=u.cloneRange(),p=Iy.toDOMNode(t,d);f.setEndAfter(p),l=f.cloneContents()}if(a&&(c=l.querySelector("[data-slate-spacer]")),Array.from(l.querySelectorAll("[data-slate-zero-width]")).forEach(function(e){var t="n"===e.getAttribute("data-slate-zero-width");e.textContent=t?"\n":""}),Vm(c)){var h=c.ownerDocument.createElement("span");h.style.whiteSpace="pre",h.appendChild(c),l.appendChild(h),c=h}var g=t.getFragment(),v=JSON.stringify(g),m=window.btoa(encodeURIComponent(v));c.setAttribute("data-slate-fragment",m),e.setData("application/x-slate-fragment",m);var y=l.ownerDocument.createElement("div");return y.appendChild(l),y.setAttribute("hidden","true"),l.ownerDocument.body.appendChild(y),e.setData("text/html",y.innerHTML),e.setData("text/plain",Km(y)),l.ownerDocument.body.removeChild(y),e}}},t.insertData=function(e){var n=e.getData("application/x-slate-fragment");if(n){var r=decodeURIComponent(window.atob(n)),o=JSON.parse(r);t.insertFragment(o)}else{var i=e.getData("text/plain"),a=e.getData("text/html");if(a){var s=t.getConfig().sanitizeHtml;t.dangerouslyInsertHtml(s?s(a):a)}else if(i){if(!/[\r\n]/.test(i))return void t.insertText(i);var u=function(e){return e.replace(/\n\r|\r\n|\r/g,"\n").split("\n").map(function(e){return{type:"paragraph",children:[{text:e}]}})}(i);t.insertFragment(u)}}},t};function Gb(e){return e.replace(/\n\r|\r\n|\r|\n/g,"").length}function qb(e,t){var n,r;if(t<=0)return"";var o=t,i="";try{for(var a=_g(e),s=a.next();!s.done;s=a.next()){var u=s.value;if(/\r|\n/.test(u))i+=u;else{if(o<=0)break;i+=u,o-=1}}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return i}var Kb=function(e){var t=e,n=t.insertText,r=t.insertNode,o=t.insertFragment,i=t.dangerouslyInsertHtml;return t.insertText=function(e){if(t.getConfig().maxLength){var r=Iy.getLeftLengthOfMaxLength(t);r<=0||(r<e.length?n(e.slice(0,r)):n(e))}else n(e)},t.insertNode=function(e){if(t.getConfig().maxLength){var n=Iy.getLeftLengthOfMaxLength(t);if(!(n<=0))n<_p.string(e).length||r(e)}else r(e)},t.insertFragment=function(e){if(t.getConfig().maxLength){if(e.length>0){var n=e[0];if(Iy.getLeftLengthOfMaxLength(t)<_p.string(n).length)return;o([n]);for(var r=1;r<e.length;r+=1)t.insertNode(e[r])}}else o(e)},t.dangerouslyInsertHtml=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=!1),e)if(t.getConfig().maxLength){var r=Iy.getLeftLengthOfMaxLength(t);if(!(r<=0)){var o=function(e,t){if(t<=0)return"";var n=document.createElement("div");n.innerHTML=e;var r=function(e){e.forEach(function(e){return e.remove()})},o=function(e){for(var n=Array.from(e.childNodes),i=0;i<n.length;i+=1){var a=n[i];if(Vm(a)){var s=a.textContent||"",u=Gb(s);if(u<=t){t-=u;continue}return a.textContent=qb(s,t),t=0,r(n.slice(i+1)),!1}if($m(a)){if(Hv.has(a.nodeName.toLowerCase())){a.remove();continue}if(!o(a))return r(n.slice(i+1)),!1}else a.remove()}return t>0};return o(n),n.innerHTML}(e,r);o&&i(o,n)}}else i(e,n)},t};function Yb(e){var t=Iy.getTextarea(e).$textAreaContainer,n=t.width(),r=t.height(),o=t.offset();return{top:o.top,left:o.left,width:n,height:r}}function Xb(e){var t={top:"0",left:"0"},n=e.selection;if(null==n)return t;var r=Yb(e);if(null==r)return t;var o=r.top,i=r.left,a=r.width,s=r.height,u=Iy.toDOMRange(e,n).getClientRects(),l=u?u[0]:null;if(null==l)return t;var c={},d=l.top-o,f=l.left-i;if(f>a/2){var p=a-f;c.right="".concat(p+5,"px")}else c.left="".concat(f+5,"px");if(d>s/2){var h=s-d;c.bottom="".concat(h+5,"px")}else{var g=u[u.length-1],v=g.top-o+g.height;v<0&&(v=0),c.top="".concat(v+5,"px")}return c}function Zb(e,t,n){void 0===n&&(n="modal");var r={top:"0",left:"0"};if(null==e.selection)return r;var o=kp.isElement(t)&&e.isVoid(t),i=kp.isElement(t)&&e.isInline(t),a=Tv.get(t);if(null==a)return r;var s=a.getBoundingClientRect(),u=s.top,l=s.left,c=s.height,d=s.width;if(o){var f=function(e){var t=[];t.push(e);for(var n=0;t.length>0;){var r=t.pop();if(null==r)break;if((n+=1)>1e4)break;var o=r.nodeName;if(r.nodeType===Rm.ELEMENT_NODE){var i=o.toLowerCase();if(km.includes(i)||"iframe"===i||"video"===i)return r;var a=r.children||[],s=a.length;if(s)for(var u=s-1;u>=0;u-=1)t.push(a[u])}}return null}(a);if(null!=f){var p=f.getBoundingClientRect();u=p.top,c=p.height}}var h=Yb(e);if(null==h)return r;var g=h.top,v=h.left,m=h.width,y=h.height,b={},E=u-g,w=l-v;if("bar"===n)return b.left="".concat(w,"px"),E>40?b.bottom="".concat(y-E+5,"px"):b.top="".concat(E+c+5,"px"),b;if("modal"===n){if(o?i?w>(m-d)/2?b.right="".concat(m-w+5,"px"):b.left="".concat(w+d+5,"px"):b.left="20px":b.left="".concat(w,"px"),o)(C=E)<0&&(C=0),b.top="".concat(C,"px");else if(E>(y-c)/2)b.bottom="".concat(y-E+5,"px");else{var C;(C=E+c)<0&&(C=0),b.top="".concat(C+5,"px")}return b}throw new Error("type '".concat(n,"' is invalid"))}function Jb(e,t){Im(function(){var n=Yb(e);if(null!=n){var r,o=n.top,i=n.left,a=n.width,s=n.height,u=t.offset(),l=u.top,c=u.left,d=t.width(),f=t.height(),p=l-o,h=c-i,g=t.attr("style");if(g.indexOf("top")>=0)if((r=p+f-s)>0){var v=t.css("top"),m=parseInt(v.toString(),10)-r;m<0&&(m=0),t.css("top","".concat(m,"px"))}if(g.indexOf("bottom")>=0&&l<0){var y=t.css("bottom"),b=parseInt(y.toString(),10)-Math.abs(l);t.css("bottom","".concat(b,"px"))}if(g.indexOf("left")>=0)if((r=h+d-a)>0){var E=t.css("left"),w=parseInt(E.toString(),10)-r;w<0&&(w=0),t.css("left","".concat(w,"px"))}if(g.indexOf("right")>=0&&c<0){var C=t.css("right"),D=parseInt(C.toString(),10)-Math.abs(c);t.css("right","".concat(D,"px"))}}})}var Qb,eE,tE=function(e){var t=e,n=t.select,r=t.deselect,o=t.move;return t.select=function(e){n(e)},t.deselect=function(){var e=t.selection,n=Iy.findDocumentOrShadowRoot(t).getSelection();n&&n.rangeCount>0&&Iy.hasDOMNode(t,n.anchorNode)&&Iy.hasDOMNode(t,n.focusNode)&&n.removeAllRanges(),e&&r()},t.move=function(e,t){void 0===t&&(t=!1),"number"==typeof e?e&&(e<0||o({distance:e,unit:"character",reverse:t})):o(e)},t.moveReverse=function(e){t.move(e,!0)},t.restoreSelection=function(){var e=Pv.get(t);null!=e&&(t.focus(),n(e))},t.getSelectionPosition=function(){return Xb(t)},t.getNodePosition=function(e){return Zb(t,e)},t.isSelectedAll=function(){var e=t.selection;if(null==e)return!1;var n=Lg(Bp.edges(e),2),r=n[0],o=n[1],i=Lg(mh.edges(t,[]),2),a=i[0],s=i[1];return!(!wh.equals(r,a)||!wh.equals(o,s))},t.selectAll=function(){var e=mh.start(t,[]),r=mh.end(t,[]);n({anchor:e,focus:r})},t};var nE=function(){if(eE)return Qb;eE=1;var e=/^\s+|\s+$/g,t=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,r=/^0o[0-7]+$/i,o=parseInt,i="object"==typeof y&&y&&y.Object===Object&&y,a="object"==typeof self&&self&&self.Object===Object&&self,s=i||a||Function("return this")(),u=Object.prototype.toString,l=Math.max,c=Math.min,d=function(){return s.Date.now()};function f(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function p(i){if("number"==typeof i)return i;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==u.call(e)}(i))return NaN;if(f(i)){var a="function"==typeof i.valueOf?i.valueOf():i;i=f(a)?a+"":a}if("string"!=typeof i)return 0===i?i:+i;i=i.replace(e,"");var s=n.test(i);return s||r.test(i)?o(i.slice(2),s?2:8):t.test(i)?NaN:+i}return Qb=function(e,t,n){var r,o,i,a,s,u,h=0,g=!1,v=!1,m=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=r,i=o;return r=o=void 0,h=t,a=e.apply(i,n)}function b(e){var n=e-u;return void 0===u||n>=t||n<0||v&&e-h>=i}function E(){var e=d();if(b(e))return w(e);s=setTimeout(E,function(e){var n=t-(e-u);return v?c(n,i-(e-h)):n}(e))}function w(e){return s=void 0,m&&r?y(e):(r=o=void 0,a)}function C(){var e=d(),n=b(e);if(r=arguments,o=this,u=e,n){if(void 0===s)return function(e){return h=e,s=setTimeout(E,t),g?y(e):a}(u);if(v)return s=setTimeout(E,t),y(u)}return void 0===s&&(s=setTimeout(E,t)),a}return t=p(t)||0,f(n)&&(g=!!n.leading,i=(v="maxWait"in n)?l(p(n.maxWait)||0,t):i,m="trailing"in n?!!n.trailing:m),C.cancel=function(){void 0!==s&&clearTimeout(s),h=0,r=u=o=s=void 0},C.flush=function(){return void 0===s?a:w(d())},C},Qb}(),rE=b(nE);const oE=e=>"string"==typeof e,iE=()=>{let e,t;const n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},aE=e=>null==e?"":""+e,sE=/###/g,uE=e=>e&&e.indexOf("###")>-1?e.replace(sE,"."):e,lE=e=>!e||oE(e),cE=(e,t,n)=>{const r=oE(t)?t.split("."):t;let o=0;for(;o<r.length-1;){if(lE(e))return{};const t=uE(r[o]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++o}return lE(e)?{}:{obj:e,k:uE(r[o])}},dE=(e,t,n)=>{const{obj:r,k:o}=cE(e,t,Object);if(void 0!==r||1===t.length)return void(r[o]=n);let i=t[t.length-1],a=t.slice(0,t.length-1),s=cE(e,a,Object);for(;void 0===s.obj&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=cE(e,a,Object),s&&s.obj&&void 0!==s.obj[`${s.k}.${i}`]&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},fE=(e,t)=>{const{obj:n,k:r}=cE(e,t);if(n)return n[r]},pE=(e,t,n)=>{for(const r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?oE(e[r])||e[r]instanceof String||oE(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):pE(e[r],t[r],n):e[r]=t[r]);return e},hE=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var gE={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const vE=e=>oE(e)?e.replace(/[&<>"'\/]/g,e=>gE[e]):e;const mE=[" ",",","?","!",";"],yE=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(void 0!==t)return t;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),bE=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let e=0;e<r.length;){if(!o||"object"!=typeof o)return;let t,i="";for(let a=e;a<r.length;++a)if(a!==e&&(i+=n),i+=r[a],t=o[i],void 0!==t){if(["string","number","boolean"].indexOf(typeof t)>-1&&a<r.length-1)continue;e+=a-e+1;break}o=t}return o},EE=e=>e&&e.replace("_","-"),wE={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class CE{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.init(e,t)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||wE,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(oE(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new CE(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new CE(this.logger,e)}}var DE=new CE;class AE{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);const n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])}emit(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){Array.from(this.observers[e].entries()).forEach(e=>{let[t,r]=e;for(let e=0;e<r;e++)t(...n)})}if(this.observers["*"]){Array.from(this.observers["*"].entries()).forEach(t=>{let[r,o]=t;for(let t=0;t<o;t++)r.apply(r,[e,...n])})}}}class SE extends AE{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):oE(n)&&o?a.push(...n.split(o)):a.push(n)));const s=fE(this.data,a);return!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&oE(n)?bE(this.data&&this.data[e]&&this.data[e][t],n,o):s}addResource(e,t,n,r){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1};const i=void 0!==o.keySeparator?o.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(a=e.split("."),r=t,t=a[1]),this.addNamespaces(t),dE(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}addResources(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(const r in n)(oE(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),r=n,n=t,t=a[1]),this.addNamespaces(t);let s=fE(this.data,a)||{};i.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?pE(s,n,o):s={...s,...n},dE(this.data,a,s),i.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var OE={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(e=>{this.processors[e]&&(t=this.processors[e].process(t,n,r,o))}),t}};const xE={};class NE extends AE{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=DE.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;const n=this.resolve(e,t);return n&&void 0!==n.res}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");const r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator;let o=t.ns||this.options.defaultNS||[];const i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||((e,t,n)=>{t=t||"",n=n||"";const r=mE.filter(e=>t.indexOf(e)<0&&n.indexOf(e)<0);if(0===r.length)return!0;const o=yE.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`);let i=!o.test(e);if(!i){const t=e.indexOf(n);t>0&&!o.test(e.substring(0,t))&&(i=!0)}return i})(e,n,r));if(i&&!a){const t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:oE(o)?[o]:o};const i=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(i[0])>-1)&&(o=i.shift()),e=i.join(r)}return{key:e,namespaces:oE(o)?[o]:o}}translate(e,t,n){if("object"!=typeof t&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof t&&(t={...t}),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);const r=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,o=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,{key:i,namespaces:a}=this.extractFromKey(e[e.length-1],t),s=a[a.length-1],u=t.lng||this.language,l=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&"cimode"===u.toLowerCase()){if(l){const e=t.nsSeparator||this.options.nsSeparator;return r?{res:`${s}${e}${i}`,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:`${s}${e}${i}`}return r?{res:i,usedKey:i,exactUsedKey:i,usedLng:u,usedNS:s,usedParams:this.getUsedParamsDetails(t)}:i}const c=this.resolve(e,t);let d=c&&c.res;const f=c&&c.usedKey||i,p=c&&c.exactUsedKey||i,h=Object.prototype.toString.apply(d),g=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,m=!oE(d)&&"boolean"!=typeof d&&"number"!=typeof d;if(!(v&&d&&m&&["[object Number]","[object Function]","[object RegExp]"].indexOf(h)<0)||oE(g)&&Array.isArray(d))if(v&&oE(g)&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,e,t,n));else{let r=!1,a=!1;const l=void 0!==t.count&&!oE(t.count),f=NE.hasDefaultValue(t),p=l?this.pluralResolver.getSuffix(u,t.count,t):"",h=t.ordinal&&l?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",g=l&&!t.ordinal&&0===t.count&&this.pluralResolver.shouldUseIntlApi(),v=g&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${p}`]||t[`defaultValue${h}`]||t.defaultValue;!this.isValidLookup(d)&&f&&(r=!0,d=v),this.isValidLookup(d)||(a=!0,d=i);const m=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:d,y=f&&v!==d&&this.options.updateMissing;if(a||r||y){if(this.logger.log(y?"updateKey":"missingKey",u,s,i,y?v:d),o){const e=this.resolve(i,{...t,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[];const n=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&n&&n[0])for(let t=0;t<n.length;t++)e.push(n[t]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(t.lng||this.language):e.push(t.lng||this.language);const r=(e,n,r)=>{const o=f&&r!==d?r:m;this.options.missingKeyHandler?this.options.missingKeyHandler(e,s,n,o,y,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(e,s,n,o,y,t),this.emit("missingKey",e,s,n,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&l?e.forEach(e=>{const n=this.pluralResolver.getSuffixes(e,t);g&&t[`defaultValue${this.options.pluralSeparator}zero`]&&n.indexOf(`${this.options.pluralSeparator}zero`)<0&&n.push(`${this.options.pluralSeparator}zero`),n.forEach(n=>{r([e],i+n,t[`defaultValue${n}`]||v)})}):r(e,i,v))}d=this.extendTranslation(d,e,t,c,n),a&&d===i&&this.options.appendNamespaceToMissingKey&&(d=`${s}:${i}`),(a||r)&&this.options.parseMissingKeyHandler&&(d="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${s}:${i}`:i,r?d:void 0):this.options.parseMissingKeyHandler(d))}else{if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,d,{...t,ns:a}):`key '${i} (${this.language})' returned an object instead of string.`;return r?(c.res=e,c.usedParams=this.getUsedParamsDetails(t),c):e}if(o){const e=Array.isArray(d),n=e?[]:{},r=e?p:f;for(const e in d)if(Object.prototype.hasOwnProperty.call(d,e)){const i=`${r}${o}${e}`;n[e]=this.translate(i,{...t,joinArrays:!1,ns:a}),n[e]===i&&(n[e]=d[e])}d=n}}return r?(c.res=d,c.usedParams=this.getUsedParamsDetails(t),c):d}extendTranslation(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const a=oE(e)&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let s;if(a){const t=e.match(this.interpolator.nestingRegexp);s=t&&t.length}let u=n.replace&&!oE(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,n.lng||this.language||r.usedLng,n),a){const t=e.match(this.interpolator.nestingRegexp);s<(t&&t.length)&&(n.nest=!1)}!n.lng&&"v1"!==this.options.compatibilityAPI&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn(`It seems you are nesting recursively key: ${r[0]} in key: ${t[0]}`),null):i.translate(...r,t)},n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,s=oE(a)?[a]:a;return null!=e&&s&&s.length&&!1!==n.applyPostProcessor&&(e=OE.handle(s,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t,n,r,o,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return oE(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(t))return;const s=this.extractFromKey(e,a),u=s.key;n=u;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const c=void 0!==a.count&&!oE(a.count),d=c&&!a.ordinal&&0===a.count&&this.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&(oE(a.context)||"number"==typeof a.context)&&""!==a.context,p=a.lngs?a.lngs:this.languageUtils.toResolveHierarchy(a.lng||this.language,a.fallbackLng);l.forEach(e=>{this.isValidLookup(t)||(i=e,!xE[`${p[0]}-${e}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(i)&&(xE[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${n}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(n=>{if(this.isValidLookup(t))return;o=n;const i=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(i,u,n,e,a);else{let e;c&&(e=this.pluralResolver.getSuffix(n,a.count,a));const t=`${this.options.pluralSeparator}zero`,r=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(i.push(u+e),a.ordinal&&0===e.indexOf(r)&&i.push(u+e.replace(r,this.options.pluralSeparator)),d&&i.push(u+t)),f){const n=`${u}${this.options.contextSeparator}${a.context}`;i.push(n),c&&(i.push(n+e),a.ordinal&&0===e.indexOf(r)&&i.push(n+e.replace(r,this.options.pluralSeparator)),d&&i.push(n+t))}}let s;for(;s=i.pop();)this.isValidLookup(t)||(r=s,t=this.getResource(n,e,s,a))}))})}),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}isValidLookup(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}getResource(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!oE(e.replace);let r=n?e.replace:e;if(n&&void 0!==e.count&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(const e of t)delete r[e]}return r}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,12)&&void 0!==e[n])return!0;return!1}}const BE=e=>e.charAt(0).toUpperCase()+e.slice(1);class TE{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=DE.create("languageUtils")}getScriptPartFromCode(e){if(!(e=EE(e))||e.indexOf("-")<0)return null;const t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}getLanguagePartFromCode(e){if(!(e=EE(e))||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(oE(e)&&e.indexOf("-")>-1){if("undefined"!=typeof Intl&&void 0!==Intl.getCanonicalLocales)try{let t=Intl.getCanonicalLocales(e)[0];if(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)return t}catch(e){}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(e=>e.toLowerCase()):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=BE(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=BE(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=BE(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;const n=this.formatLanguageCode(e);this.options.supportedLngs&&!this.isSupportedCode(n)||(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;const n=this.getLanguagePartFromCode(e);if(this.isSupportedCode(n))return t=n;t=this.options.supportedLngs.find(e=>e===n?e:e.indexOf("-")<0&&n.indexOf("-")<0?void 0:e.indexOf("-")>0&&n.indexOf("-")<0&&e.substring(0,e.indexOf("-"))===n||0===e.indexOf(n)&&n.length>1?e:void 0)}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),oE(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),r=[],o=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return oE(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):oE(e)&&o(this.formatLanguageCode(e)),n.forEach(e=>{r.indexOf(e)<0&&o(this.formatLanguageCode(e))}),r}}let kE=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],FE={1:e=>Number(e>1),2:e=>Number(1!=e),3:e=>0,4:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),5:e=>Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5),6:e=>Number(1==e?0:e>=2&&e<=4?1:2),7:e=>Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2),8:e=>Number(1==e?0:2==e?1:8!=e&&11!=e?2:3),9:e=>Number(e>=2),10:e=>Number(1==e?0:2==e?1:e<7?2:e<11?3:4),11:e=>Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3),12:e=>Number(e%10!=1||e%100==11),13:e=>Number(0!==e),14:e=>Number(1==e?0:2==e?1:3==e?2:3),15:e=>Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2),16:e=>Number(e%10==1&&e%100!=11?0:0!==e?1:2),17:e=>Number(1==e||e%10==1&&e%100!=11?0:1),18:e=>Number(0==e?0:1==e?1:2),19:e=>Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3),20:e=>Number(1==e?0:0==e||e%100>0&&e%100<20?1:2),21:e=>Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0),22:e=>Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)};const IE=["v1","v2","v3"],PE=["v4"],RE={zero:0,one:1,two:2,few:3,many:4,other:5};class _E{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=DE.create("pluralResolver"),this.options.compatibilityJSON&&!PE.includes(this.options.compatibilityJSON)||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(()=>{const e={};return kE.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:FE[t.fc]}})}),e})(),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi()){const n=EE("dev"===e?"en":e),r=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:n,type:r});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let i;try{i=new Intl.PluralRules(n,{type:r})}catch(n){if(!e.match(/-|_/))return;const r=this.languageUtils.getLanguagePartFromCode(e);i=this.getRule(r,t)}return this.pluralRulesCache[o]=i,i}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}getPluralFormsOfKey(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((e,t)=>RE[e]-RE[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):n.numbers.map(n=>this.getSuffix(e,n,t)):[]}getSuffix(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:this.getSuffixRetroCompatible(r,t):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,t){const n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let r=e.numbers[n];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===r?r="plural":1===r&&(r=""));const o=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return"v1"===this.options.compatibilityJSON?1===r?"":"number"==typeof r?`_plural_${r.toString()}`:o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!IE.includes(this.options.compatibilityJSON)}}const LE=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=((e,t,n)=>{const r=fE(e,n);return void 0!==r?r:fE(t,n)})(e,t,n);return!i&&o&&oE(n)&&(i=bE(e,n,r),void 0===i&&(i=bE(t,n,r))),i},ME=e=>e.replace(/\$/g,"$$$$");class jE{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=DE.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(e=>e),this.init(e)}init(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:o,prefixEscaped:i,suffix:a,suffixEscaped:s,formatSeparator:u,unescapeSuffix:l,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:g,maxReplaces:v,alwaysFormat:m}=e.interpolation;this.escape=void 0!==t?t:vE,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=o?hE(o):i||"{{",this.suffix=a?hE(a):s||"}}",this.formatSeparator=u||",",this.unescapePrefix=l?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":l||"",this.nestingPrefix=d?hE(d):f||hE("$t("),this.nestingSuffix=p?hE(p):h||hE(")"),this.nestingOptionsSeparator=g||",",this.maxReplaces=v||1e3,this.alwaysFormat=void 0!==m&&m,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(e,t)=>e&&e.source===t?(e.lastIndex=0,e):new RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let o,i,a;const s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=e=>{if(e.indexOf(this.formatSeparator)<0){const o=LE(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(o,void 0,n,{...r,...t,interpolationkey:e}):o}const o=e.split(this.formatSeparator),i=o.shift().trim(),a=o.join(this.formatSeparator).trim();return this.format(LE(t,s,i,this.options.keySeparator,this.options.ignoreJSONStructure),a,n,{...r,...t,interpolationkey:i})};this.resetRegExp();const l=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,d=[{regex:this.regexpUnescape,safeValue:e=>ME(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?ME(this.escape(e)):ME(e)}];return d.forEach(t=>{for(a=0;o=t.regex.exec(e);){const n=o[1].trim();if(i=u(n),void 0===i)if("function"==typeof l){const t=l(e,o,r);i=oE(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))i="";else{if(c){i=o[0];continue}this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),i=""}else oE(i)||this.useRawValueToEscape||(i=aE(i));const s=t.safeValue(i);if(e=e.replace(o[0],s),c?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let n,r,o,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=(e,t)=>{const n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;const r=e.split(new RegExp(`${n}[ ]*{`));let i=`{${r[1]}`;e=r[0],i=this.interpolate(i,o);const a=i.match(/'/g),s=i.match(/"/g);(a&&a.length%2==0&&!s||s.length%2!=0)&&(i=i.replace(/'/g,'"'));try{o=JSON.parse(i),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;n=this.nestingRegexp.exec(e);){let s=[];o={...i},o=o.replace&&!oE(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){const e=n[1].split(this.formatSeparator).map(e=>e.trim());n[1]=e.shift(),s=e,u=!0}if(r=t(a.call(this,n[1].trim(),o),o),r&&n[0]===e&&!oE(r))return r;oE(r)||(r=aE(r)),r||(this.logger.warn(`missed to resolve ${n[1]} for nesting ${e}`),r=""),u&&(r=s.reduce((e,t)=>this.format(e,t,i.lng,{...i,interpolationkey:n[1].trim()}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}const HE=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(EE(r),o),t[a]=s),s(n)}};class zE{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.logger=DE.create("formatter"),this.options=e,this.formats={number:HE((e,t)=>{const n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:HE((e,t)=>{const n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:HE((e,t)=>{const n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:HE((e,t)=>{const n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:HE((e,t)=>{const n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})},this.init(e)}init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};this.formatSeparator=t.interpolation.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=HE(t)}format(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const o=t.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(e=>e.indexOf(")")>-1)){const e=o.findIndex(e=>e.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,e)].join(this.formatSeparator)}const i=o.reduce((e,t)=>{const{formatName:o,formatOptions:i}=(e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(e=>{if(e){const[t,...r]=e.split(":"),o=r.join(":").trim().replace(/^'+|'+$/g,""),i=t.trim();n[i]||(n[i]=o),"false"===o&&(n[i]=!1),"true"===o&&(n[i]=!0),isNaN(o)||(n[i]=parseInt(o,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[o]){let t=e;try{const a=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},s=a.locale||a.lng||r.locale||r.lng||n;t=this.formats[o](e,s,{...i,...r,...a})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${o}`),e},e);return i}}class $E extends AE{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=DE.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(n,r.backend,r)}queueLoad(e,t,n,r){const o={},i={},a={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{const a=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[a]=2:this.state[a]<0||(1===this.state[a]?void 0===i[a]&&(i[a]=!0):(this.state[a]=1,r=!1,void 0===i[a]&&(i[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(a[e]=!0)}),(Object.keys(o).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(i),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){const r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),!t&&n&&this.store.addResourceBundle(o,i,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);const a={};this.queue.forEach(n=>{((e,t,n)=>{const{obj:r,k:o}=cE(e,t,Object);r[o]=r[o]||[],r[o].push(n)})(n.loaded,[o],i),((e,t)=>{void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)})(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{a[e]||(a[e]={});const t=n.loaded[e];t.length&&t.forEach(t=>{void 0===a[e][t]&&(a[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:o,callback:i});this.readingCalls++;const a=(a,s)=>{if(this.readingCalls--,this.waitingReads.length>0){const e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}a&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*o,i)},o):i(a,s)},s=this.backend[n].bind(this.backend);if(2!==s.length)return s(e,t,a);try{const n=s(e,t);n&&"function"==typeof n.then?n.then(e=>a(null,e)).catch(a):a(null,n)}catch(e){a(e)}}prepareLoading(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();oE(e)&&(e=this.languageUtils.toResolveHierarchy(e)),oE(t)&&(t=[t]);const o=this.queueLoad(e,t,n,r);if(!o.toLoad.length)return o.pending.length||r(),null;o.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e.split("|"),r=n[0],o=n[1];this.read(r,o,"read",void 0,void 0,(n,i)=>{n&&this.logger.warn(`${t}loading namespace ${o} for language ${r} failed`,n),!n&&i&&this.logger.log(`${t}loaded namespace ${o} for language ${r}`,i),this.loaded(e,n,i)})}saveMissing(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){const s={...i,isUpdate:o},u=this.backend.create.bind(this.backend);if(u.length<6)try{let o;o=5===u.length?u(e,t,n,r,s):u(e,t,n,r),o&&"function"==typeof o.then?o.then(e=>a(null,e)).catch(a):a(null,o)}catch(e){a(e)}else u(e,t,n,r,a,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}const UE=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),oE(e[1])&&(t.defaultValue=e[1]),oE(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){const n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),VE=e=>(oE(e.ns)&&(e.ns=[e.ns]),oE(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),oE(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),WE=()=>{};class GE extends AE{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;var n;if(super(),this.options=VE(e),this.services={},this.logger=DE,this.modules={external:[]},n=this,Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(e=>{"function"==typeof n[e]&&(n[e]=n[e].bind(n))}),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&(oE(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const r=UE();this.options={...r,...this.options,...VE(t)},"v1"!==this.options.compatibilityAPI&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator);const o=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let t;this.modules.logger?DE.init(o(this.modules.logger),this.options):DE.init(null,this.options),this.modules.formatter?t=this.modules.formatter:"undefined"!=typeof Intl&&(t=zE);const n=new TE(this.options);this.store=new SE(this.options.resources,this.options);const i=this.services;i.logger=DE,i.resourceStore=this.store,i.languageUtils=n,i.pluralResolver=new _E(n,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!t||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(i.formatter=o(t),i.formatter.init(i,this.options),this.options.interpolation.format=i.formatter.format.bind(i.formatter)),i.interpolator=new jE(this.options),i.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},i.backendConnector=new $E(o(this.modules.backend),i.resourceStore,i,this.options),i.backendConnector.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)}),this.modules.languageDetector&&(i.languageDetector=o(this.modules.languageDetector),i.languageDetector.init&&i.languageDetector.init(i,this.options.detection,this.options)),this.modules.i18nFormat&&(i.i18nFormat=o(this.modules.i18nFormat),i.i18nFormat.init&&i.i18nFormat.init(this)),this.translator=new NE(this.services,this.options),this.translator.on("*",function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit(t,...r)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,n||(n=WE),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(t=>{this[t]=function(){return e.store[t](...arguments)}});["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(t=>{this[t]=function(){return e.store[t](...arguments),e}});const i=iE(),a=()=>{const e=(e,t)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),i.resolve(t),n(e,t)};if(this.languages&&"v1"!==this.options.compatibilityAPI&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initImmediate?a():setTimeout(a,0),i}loadResources(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:WE;const n=oE(e)?e:this.language;if("function"==typeof e&&(t=e),!this.options.resources||this.options.partialBundledLanguages){if(n&&"cimode"===n.toLowerCase()&&(!this.options.preload||0===this.options.preload.length))return t();const e=[],r=t=>{if(!t)return;if("cimode"===t)return;this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&e.indexOf(t)<0&&e.push(t)})};if(n)r(n);else{this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>r(e))}this.options.preload&&this.options.preload.forEach(e=>r(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),t(e)})}else t(null)}reloadResources(e,t,n){const r=iE();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=WE),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&OE.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(let e=0;e<this.languages.length;e++){const t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const r=iE();this.emit("languageChanging",e);const o=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(e,i)=>{i?(o(i),this.translator.changeLanguage(i),this.isLanguageChangingTo=void 0,this.emit("languageChanged",i),this.logger.log("languageChanged",i)):this.isLanguageChangingTo=void 0,r.resolve(function(){return n.t(...arguments)}),t&&t(e,function(){return n.t(...arguments)})},a=t=>{e||t||!this.services.languageDetector||(t=[]);const n=oE(t)?t:this.services.languageUtils.getBestMatchFromCodes(t);n&&(this.language||o(n),this.translator.language||this.translator.changeLanguage(n),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(n)),this.loadResources(n,e=>{i(e,n)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}getFixedT(e,t,n){var r=this;const o=function(e,t){let i;if("object"!=typeof t){for(var a=arguments.length,s=new Array(a>2?a-2:0),u=2;u<a;u++)s[u-2]=arguments[u];i=r.options.overloadTranslationOptionHandler([e,t].concat(s))}else i={...t};i.lng=i.lng||o.lng,i.lngs=i.lngs||o.lngs,i.ns=i.ns||o.ns,""!==i.keyPrefix&&(i.keyPrefix=i.keyPrefix||n||o.keyPrefix);const l=r.options.keySeparator||".";let c;return c=i.keyPrefix&&Array.isArray(e)?e.map(e=>`${i.keyPrefix}${l}${e}`):i.keyPrefix?`${i.keyPrefix}${l}${e}`:e,r.t(c,i)};return oE(e)?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const i=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||0===n||2===n};if(t.precheck){const e=t.precheck(this,i);if(void 0!==e)return e}return!!this.hasResourceBundle(n,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(n,e)||r&&!i(o,e)))}loadNamespaces(e,t){const n=iE();return this.options.ns?(oE(e)&&(e=[e]),e.forEach(e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=iE();oE(e)&&(e=[e]);const r=this.options.preload||[],o=e.filter(e=>r.indexOf(e)<0&&this.services.languageUtils.isSupportedCode(e));return o.length?(this.options.preload=r.concat(o),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new TE(UE());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new GE(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:WE;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},o=new GE(r);void 0===e.debug&&void 0===e.prefix||(o.logger=o.logger.clone(e));return["store","services","language"].forEach(e=>{o[e]=this[e]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},n&&(o.store=new SE(this.store.data,r),o.services.resourceStore=o.store),o.translator=new NE(o.services,r),o.translator.on("*",function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];o.emit(e,...n)}),o.init(r,t),o.translator.options=r,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const qE=GE.createInstance();qE.createInstance=GE.createInstance,qE.createInstance,qE.dir,qE.init,qE.loadResources,qE.reloadResources,qE.use,qE.changeLanguage,qE.getFixedT,qE.t,qE.exists,qE.setDefaultNamespace,qE.hasLoadedNamespace,qE.loadNamespaces,qE.loadLanguages;var KE="translation";function YE(e,t){qE.addResourceBundle(e,KE,t,!0,!0)}function XE(e){qE.changeLanguage(e)}function ZE(e){return qE.getResourceBundle(e,KE)}function JE(e){return qE.on("languageChanged",e),function(){return qE.off("languageChanged",e)}}qE.init({lng:"zh-CN",resources:{}});var QE=qE.t.bind(qE);function ew(e){if(e.removeAttr){e.removeAttr("width"),e.removeAttr("height"),e.removeAttr("fill"),e.removeAttr("class"),e.removeAttr("t"),e.removeAttr("p-id");var t=e.children();t.length&&ew(t)}}function tw(){return Zv('<svg viewBox="0 0 1024 1024"><path d="M498.7 655.8l-197.6-268c-8.1-10.9-0.3-26.4 13.3-26.4h395.2c13.6 0 21.4 15.4 13.3 26.4l-197.6 268c-6.6 9-20 9-26.6 0z"></path></svg>')}function nw(){return Zv('<div class="w-e-bar-divider"></div>')}function rw(e,t,n,r,o){if(void 0===r&&(r=""),void 0===o&&(o=!1),t){if(r){var i=Ay?"cmd":"ctrl";r=r.replace("mod",i)}if(o)r&&(e.attr("data-tooltip",r),e.addClass("w-e-menu-tooltip-v5"),e.addClass("tooltip-right"));else{var a=r?"".concat(n,"\n").concat(r):n;e.attr("data-tooltip",a),e.addClass("w-e-menu-tooltip-v5")}}}var ow=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=Zv('<div class="w-e-bar-item"></div>'),this.$button=Zv('<button type="button"></button>'),this.disabled=!1,this.menu=t;var o=t.tag,i=t.width;if("button"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'button'"));var a=t.title,s=t.hotkey,u=void 0===s?"":s,l=t.iconSvg,c=void 0===l?"":l,d=this.$button;if(c){var f=Zv(c);ew(f),d.append(f)}else d.text(a);rw(d,c,a,u,n),n&&c&&d.append(Zv('<span class="title">'.concat(a,"</span>"))),i&&d.css("width","".concat(i,"px")),d.attr("data-menu-key",e),this.$elem.append(d),Im(function(){return r.init()})}return e.prototype.init=function(){var e=this;this.setActive(),this.setDisabled(),this.$button.on("click",function(t){t.preventDefault(),yw(e).hidePanelOrModal(),e.disabled||(e.exec(),e.onButtonClick())})},e.prototype.exec=function(){var e=yw(this),t=this.menu,n=t.getValue(e);this.setIcon(),this.setTooltip(),t.exec(e,n)},e.prototype.setActive=function(){var e=yw(this),t=this.$button,n="active";this.menu.isActive(e)?t.addClass(n):t.removeClass(n)},e.prototype.setDisabled=function(){var e=yw(this),t=this.$button,n=this.menu.isDisabled(e);(null==e.selection||e.isDisabled())&&(n=!0),this.menu.alwaysEnable&&(n=!1);var r="disabled";n?t.addClass(r):t.removeClass(r),this.disabled=n},e.prototype.setIcon=function(){var e=yw(this),t=this.$button;if(this.menu.getIcon){var n=this.menu.getIcon(e);if(n){t.find("svg").remove();var r=Zv(n);ew(r),t.append(r)}}},e.prototype.setTooltip=function(){var e=yw(this),t=this.$button;if(this.menu.getTitle){var n=this.menu.getTitle(e),r=this.menu.iconSvg;n&&r&&rw(t,r,n)}},e.prototype.changeMenuState=function(){this.setActive(),this.setDisabled()},e}(),iw=function(e){function t(t,n,r){return void 0===r&&(r=!1),e.call(this,t,n,r)||this}return Fg(t,e),t.prototype.onButtonClick=function(){},t}(ow),aw=function(){function e(e){this.isShow=!1,this.showTime=0,this.record(e)}return e.prototype.record=function(e){var t=mv.get(e);null==t&&(t=new Set,mv.set(e,t)),t.add(this),yv.set(this,e)},e.prototype.renderContent=function(e){var t=this.$elem;t.empty(),t.append(e);var n=this.genSelfElem();n&&t.append(n)},e.prototype.appendTo=function(e){var t=this.$elem;e.append(t)},e.prototype.show=function(){if(!this.isShow){this.showTime=Date.now(),this.$elem.show(),this.isShow=!0;var e=yv.get(this);e&&e.emit(av,this)}},e.prototype.hide=function(){if(this.isShow&&!(Date.now()-this.showTime<200)){this.$elem.hide(),this.isShow=!1;var e=yv.get(this);e&&e.emit(sv)}},e}(),sw=function(e){function t(t){var n=e.call(this,t)||this;return n.type="dropPanel",n.$elem=Zv('<div class="w-e-drop-panel"></div>'),n}return Fg(t,e),t.prototype.genSelfElem=function(){return null},t}(aw),uw=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;if(o.dropPanel=null,o.menu=n,n.showDropPanel){var i=tw();o.$button.append(i)}return o}return Fg(t,e),t.prototype.onButtonClick=function(){this.menu.showDropPanel&&this.handleDropPanel()},t.prototype.handleDropPanel=function(){var e=this.menu;if(null!=e.getPanelContentElem){var t=yw(this);if(null==this.dropPanel){var n=new sw(t),r=e.getPanelContentElem(t);n.renderContent(r),n.appendTo(this.$elem),n.show(),this.dropPanel=n}else{var o=this.dropPanel;if(o.isShow)o.hide();else{r=e.getPanelContentElem(t);o.renderContent(r),o.show()}}var i=this.dropPanel;if(i.isShow){var a=this.$elem,s=a.offset().left,u=a.parents(".w-e-bar");s-u.offset().left>=u.width()/2?i.$elem.css({left:"none",right:"0"}):i.$elem.css({left:"0",right:"none"})}}},t}(ow),lw=function(e){function t(t,n){void 0===n&&(n=0);var r=e.call(this,t)||this;r.type="modal",r.$elem=Zv('<div class="w-e-modal"></div>'),r.width=0,n&&(r.width=n);var o=r.$elem;return o.on("click",function(e){return e.stopPropagation()}),o.on("keyup",function(e){"Escape"===e.code&&(r.hide(),t.restoreSelection())}),r}return Fg(t,e),t.prototype.genSelfElem=function(){var e=this,t=Zv('<span class="btn-close">'.concat('<svg viewBox="0 0 1024 1024"><path d="M1024 896.1024l-128 128L512 640 128 1024 0 896 384 512 0 128 128 0 512 384 896.1024 0l128 128L640 512z"></path></svg>',"</span>")),n=yv.get(this);return t.on("click",function(){e.hide(),null==n||n.restoreSelection()}),t},t.prototype.setStyle=function(e){var t=this.width,n=this.$elem;n.attr("style",""),t&&n.css("width","".concat(t,"px")),n.css(e)},t}(aw);function cw(e,t,n){var r=Zv('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=Zv('<input type="text" id="'.concat(t,'" placeholder="').concat(n||"",'">'));return r.append(o),[r[0],o[0]]}function dw(e,t,n){var r=Zv('<label class="babel-container"></label>');r.append("<span>".concat(e,"</span>"));var o=Zv('<textarea type="text" id="'.concat(t,'" placeholder="').concat(n||"",'"></textarea>'));return r.append(o),[r[0],o[0]]}function fw(e,t){var n=Zv('<div class="button-container"></div>'),r=Zv('<button type="button" id="'.concat(e,'">').concat(t,"</button>"));return n.append(r),[n[0],r[0]]}var pw=function(e){function t(t,n,r){void 0===r&&(r=!1);var o=e.call(this,t,n,r)||this;return o.$body=Zv("body"),o.modal=null,o.menu=n,o}return Fg(t,e),t.prototype.onButtonClick=function(){this.menu.showModal&&this.handleModal()},t.prototype.getPosition=function(){var e=yw(this),t=this.menu.getModalPositionNode(e);return kp.isElement(t)?Zb(e,t,"modal"):Xb(e)},t.prototype.handleModal=function(){var e=yw(this),t=this.menu;if(null==this.modal){var n=new lw(e,t.modalWidth);this.renderAndShowModal(n,!0),this.modal=n}else{(n=this.modal).isShow?n.hide():this.renderAndShowModal(n,!1)}},t.prototype.renderAndShowModal=function(e,t){void 0===t&&(t=!1);var n=yw(this),r=this.menu;if(null!=r.getModalContentElem){var o=Iy.getTextarea(n),i=Iy.getToolbar(n),a=((null==i?void 0:i.getConfig())||{}).modalAppendToBody,s=r.getModalContentElem(n);if(e.renderContent(s),a)e.setStyle({left:"0",right:"0"});else{var u=this.getPosition();e.setStyle(u)}t&&(a?e.appendTo(this.$body):e.appendTo(o.$textAreaContainer)),e.show(),a||Jb(n,e.$elem),setTimeout(function(){n.blur()})}},t}(ow);var hw=function(e){function t(t,n){var r=e.call(this,t)||this;return r.type="selectList",r.$elem=Zv('<div class="w-e-select-list"></div>'),n&&r.$elem.css("width","".concat(n,"px")),r.$elem.on("click",function(e){e.stopPropagation()}),r}return Fg(t,e),t.prototype.renderList=function(e){var t=this.$elem;t.empty();var n=Zv("<ul></ul>");e.forEach(function(e){var t=e.value,r=e.text,o=e.selected,i=e.styleForRenderMenuList,a=Zv('<li data-value="'.concat(t,'"></li>'));if(i&&a.css(i),o){var s=Zv('<svg viewBox="0 0 1446 1024"><path d="M574.116299 786.736392 1238.811249 48.517862C1272.390222 11.224635 1329.414799 7.827718 1366.75664 41.450462 1403.840015 74.840484 1406.731043 132.084741 1373.10189 169.433699L655.118888 966.834607C653.072421 969.716875 650.835807 972.514337 648.407938 975.210759 615.017957 1012.29409 558.292155 1015.652019 521.195664 982.250188L72.778218 578.493306C35.910826 545.297758 32.859041 488.584019 66.481825 451.242134 99.871807 414.158803 156.597563 410.800834 193.694055 444.202665L574.116299 786.736392Z"></path></svg>');a.append(s),a.addClass("selected")}a.append(Zv('<span data-value="'.concat(t,'">').concat(r,"</span>"))),a.attr("title",r),n.append(a)}),t.append(n)},t.prototype.genSelfElem=function(){return null},t}(aw);var gw=function(){function e(e,t,n){void 0===n&&(n=!1);var r=this;this.$elem=Zv('<div class="w-e-bar-item"></div>'),this.$button=Zv('<button type="button" class="select-button"></button>'),this.disabled=!1,this.selectList=null;var o=t.tag,i=t.title,a=t.width,s=t.iconSvg,u=void 0===s?"":s,l=t.hotkey,c=void 0===l?"":l;if("select"!==o)throw new Error("Invalid tag '".concat(o,"', expected 'select'"));var d=this.$button;a&&d.css("width","".concat(a,"px")),d.attr("data-menu-key",e),rw(d,u,i,c,n),this.$elem.append(d),this.menu=t,Im(function(){return r.init()})}return e.prototype.init=function(){var e=this;this.setSelectedValue(),this.$button.on("click",function(t){t.preventDefault(),yw(e).hidePanelOrModal(),e.trigger()})},e.prototype.trigger=function(){var e=this,t=yw(this);if(!t.isDisabled()&&!this.disabled){var n=this.menu;if(null==this.selectList){this.selectList=new hw(t,n.selectPanelWidth);var r=this.selectList,o=n.getOptions(t);r.renderList(o),r.appendTo(this.$elem),r.show(),r.$elem.on("click","li",function(t){var n=t.target;if(null!=n){t.preventDefault();var r=Zv(n).attr("data-value");e.onChange(r)}})}else{if((r=this.selectList).isShow)r.hide();else{o=n.getOptions(t);r.renderList(o),r.show()}}}},e.prototype.onChange=function(e){var t=yw(this),n=this.menu;n.exec&&n.exec(t,e)},e.prototype.setSelectedValue=function(){var e=yw(this),t=this.menu,n=t.getValue(e),r=function(e,t){for(var n=e.length,r="",o=0;o<n;o++){var i=e[o];if(i.value===t){r=i.text;break}}return r}(t.getOptions(e),n.toString()),o=this.$button,i=tw();o.empty(),o.text(r),o.append(i)},e.prototype.setDisabled=function(){var e=yw(this),t=this.menu.isDisabled(e),n=this.$button;(null==e.selection||e.isDisabled())&&(t=!0);var r="disabled";t?n.addClass(r):n.removeClass(r),this.disabled=t},e.prototype.changeMenuState=function(){this.setSelectedValue(),this.setDisabled()},e}(),vw=function(){function e(e){this.$elem=Zv('<div class="w-e-bar-item w-e-bar-item-group"></div>'),this.$container=Zv('<div class="w-e-bar-item-menus-container"></div>'),this.$button=Zv('<button type="button"></button>');var t=e.key,n=e.iconSvg,r=e.title,o=this.$elem,i=this.$button;if(n){var a=Zv(n);ew(a),i.append(a)}else i.text(r);i.attr("data-menu-key",t);var s=tw();i.append(s),o.append(i);var u=this.$container;o.append(u);var l=this.createObserver();this.observe(l)}return e.prototype.appendBarItem=function(e){var t=e.$elem;this.$container.append(t)},e.prototype.observe=function(e){var t=this.$container;e.observe(t[0],{childList:!0,subtree:!0,attributes:!0})},e.prototype.createObserver=function(){var e=this,t=this.$container,n=this.$button,r=new MutationObserver(function(){var o=t.find("button"),i=o.length;if(0!==i){var a=0;o.each(function(e){Zv(e).hasClass("disabled")&&a++}),r.disconnect(),a===i?n.addClass("disabled"):n.removeClass("disabled"),e.observe(r)}});return r},e}(),mw=new WeakMap;function yw(e){var t=vv.get(e);if(null==t)throw new Error("Can not get editor instance");return t}function bw(e,t,n){void 0===n&&(n=!1);var r=mw.get(t);if(r)return r;var o=t.tag;if("button"===o){var i=t.showDropPanel,a=t.showModal;r=i?new uw(e,t,n):a?new pw(e,t,n):new iw(e,t,n)}if("select"===o&&(r=new gw(e,t,n)),null==r)throw new Error("Invalid tag in menu ".concat(JSON.stringify(t)));return mw.set(t,r),r}function Ew(e,t){var n=e.selection;return null!=n&&(!Bp.isCollapsed(n)&&(!Iy.getSelectedElems(e).some(function(t){if(e.isVoid(t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)})&&!!Nh.isText(t)))}var ww,Cw,Dw=function(){function e(){var e=this;this.$elem=Zv('<div class="w-e-bar w-e-bar-hidden w-e-hover-bar"></div>'),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null,this.isShow=!1,this.lngListen=function(){},this.changeHoverbarState=rE(function(){var t=e.isShow,n=e.getSelectedNodeAndMenuKeys()||{},r=n.node,o=void 0===r?null:r,i=n.menuKeys,a=void 0===i?[]:i,s=e.getEditorInstance();if(null!=o&&e.changeItemsState(),o&&kp.isElement(o)&&t){var u=e.isSamePath(o,e.prevSelectedNode);if(!mh.isBlock(s,o)&&u)return}e.hideAndClean(),null!=o&&(e.registerItems(a),e.setPosition(o),e.show()),e.prevSelectedNode=o},200),Im(function(){var t=e.getEditorInstance(),n=e.$elem;n.on("mousedown",function(e){return e.preventDefault()},{passive:!1}),Iy.getTextarea(t).$textAreaContainer.append(n),t.on(nv,e.changeHoverbarState);var r=e.hideAndClean.bind(e);t.on(rv,r),t.on(ov,r),t.on(iv,r)}),this.lngListen=JE(function(){e.menus={},e.hideAndClean(),e.getEditorInstance().deselect()})}return e.prototype.getMenus=function(){return this.menus},e.prototype.hideAndClean=function(){var e=this.$elem;e.removeClass("w-e-bar-show").addClass("w-e-bar-hidden"),this.hoverbarItems=[],e.empty(),this.isShow=!1},e.prototype.checkPositionBottom=function(){var e=this.$elem,t=!1,n="undefined"!=typeof window?window.innerHeight:null;n&&n>=360&&(n-e[0].getBoundingClientRect().bottom<360&&(t=!0));t?e.addClass("w-e-bar-bottom"):e.removeClass("w-e-bar-bottom")},e.prototype.show=function(){this.$elem.removeClass("w-e-bar-hidden").addClass("w-e-bar-show"),this.isShow=!0,this.checkPositionBottom()},e.prototype.changeItemsState=function(){var e=this;Im(function(){e.hoverbarItems.forEach(function(e){e.changeMenuState()})})},e.prototype.registerItems=function(e){var t=this,n=this.$elem;e.forEach(function(e){if("|"!==e)t.registerSingleItem(e);else{var r=nw();n.append(r)}})},e.prototype.registerSingleItem=function(e){var t=this.getEditorInstance(),n=this.menus,r=n[e];if(null==r){var o=uv[e];if(null==o)throw new Error("Not found menu item factory by key '".concat(e,"'"));if("function"!=typeof o)throw new Error("Menu item factory (key='".concat(e,"') is not a function"));r=o(),n[e]=r}var i=t.getMenuConfig(e);i&&void 0!==i.iconSvg&&(r.iconSvg=i.iconSvg);var a=bw(e,r);this.hoverbarItems.push(a),vv.set(a,t),this.$elem.append(a.$elem)},e.prototype.setPosition=function(e){var t=this.getEditorInstance(),n=this.$elem;if(n.attr("style",""),kp.isElement(e)){var r=Zb(t,e,"bar");return n.css(r),void Jb(t,n)}if(Nh.isText(e)){r=Xb(t);return n.css(r),void Jb(t,n)}throw new Error("hoverbar.setPosition error, current selected node is not elem nor text")},e.prototype.getSelectedNodeAndMenuKeys=function(){var e=this.getEditorInstance();if(null==e.selection)return null;var t=this.getHoverbarKeysConf(),n=null,r=[],o=function(o){var i=t[o],a=i.match,s=i.menuKeys,u=void 0===s?[]:s,l=a||function(e,t){return Iy.checkNodeType(t,o)},c=Lg(mh.nodes(e,{match:function(t){return l(e,t)},universal:!0}),1),d=c[0];if(null!=d)return n=d[0],r=u,"break"};for(var i in t){if("break"===o(i))break}return null==n||0===r.length?null:{node:n,menuKeys:r}},e.prototype.getEditorInstance=function(){var e=hv.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.getHoverbarKeysConf=function(){var e=this.getEditorInstance().getConfig().hoverbarKeys,t=void 0===e?{}:e,n=t.text;return n&&null==n.match&&(n.match=Ew),t},e.prototype.isSamePath=function(e,t){if(null==e||null==t)return!1;var n=Iy.findPath(null,e),r=Iy.findPath(null,t);return Cp.equals(n,r)},e.prototype.destroy=function(){var e;this.changeHoverbarState.cancel(),this.$elem.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.hoverbarItems=[],this.prevSelectedNode=null},e}();function Aw(){if(Cw)return ww;Cw=1;var e="Expected a function",t=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,o=/^0o[0-7]+$/i,i=parseInt,a="object"==typeof y&&y&&y.Object===Object&&y,s="object"==typeof self&&self&&self.Object===Object&&self,u=a||s||Function("return this")(),l=Object.prototype.toString,c=Math.max,d=Math.min,f=function(){return u.Date.now()};function p(t,n,r){var o,i,a,s,u,l,p=0,v=!1,m=!1,y=!0;if("function"!=typeof t)throw new TypeError(e);function b(e){var n=o,r=i;return o=i=void 0,p=e,s=t.apply(r,n)}function E(e){var t=e-l;return void 0===l||t>=n||t<0||m&&e-p>=a}function w(){var e=f();if(E(e))return C(e);u=setTimeout(w,function(e){var t=n-(e-l);return m?d(t,a-(e-p)):t}(e))}function C(e){return u=void 0,y&&o?b(e):(o=i=void 0,s)}function D(){var e=f(),t=E(e);if(o=arguments,i=this,l=e,t){if(void 0===u)return function(e){return p=e,u=setTimeout(w,n),v?b(e):s}(l);if(m)return u=setTimeout(w,n),b(l)}return void 0===u&&(u=setTimeout(w,n)),s}return n=g(n)||0,h(r)&&(v=!!r.leading,a=(m="maxWait"in r)?c(g(r.maxWait)||0,n):a,y="trailing"in r?!!r.trailing:y),D.cancel=function(){void 0!==u&&clearTimeout(u),p=0,o=l=i=u=void 0},D.flush=function(){return void 0===u?s:C(f())},D}function h(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function g(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==l.call(e)}(e))return NaN;if(h(e)){var a="function"==typeof e.valueOf?e.valueOf():e;e=h(a)?a+"":a}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(t,"");var s=r.test(e);return s||o.test(e)?i(e.slice(2),s?2:8):n.test(e)?NaN:+e}return ww=function(t,n,r){var o=!0,i=!0;if("function"!=typeof t)throw new TypeError(e);return h(r)&&(o="leading"in r?!!r.leading:o,i="trailing"in r?!!r.trailing:i),p(t,n,{leading:o,maxWait:n,trailing:i})}}var Sw=b(Aw());function Ow(e,t){return Hm(t)&&Iy.hasDOMNode(e,t,{editable:!0})}function xw(e,t){return Hm(t)&&Iy.hasDOMNode(e,t)}function Nw(e,t){return Ow(e,t)||function(e,t){if(e.getConfig().readOnly)return!1;var n=xw(e,t)&&Iy.toSlateNode(e,t);return!!n&&kp.isElement(n)&&mh.isVoid(e,n)}(e,t)}const Bw=e=>"object"==typeof e&&null!=e&&1===e.nodeType,Tw=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,kw=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return Tw(n.overflowY,t)||Tw(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},Fw=(e,t,n,r,o,i,a,s)=>i<e&&a>t||i>e&&a<t?0:i<=e&&s<=n||a>=t&&s>=n?i-e-r:a>t&&s<n||i<e&&s>n?a-t+o:0,Iw=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},Pw=(e,t)=>{var n,r,o,i;if("undefined"==typeof document)return[];const{scrollMode:a,block:s,inline:u,boundary:l,skipOverflowHiddenElements:c}=t,d="function"==typeof l?l:e=>e!==l;if(!Bw(e))throw new TypeError("Invalid target");const f=document.scrollingElement||document.documentElement,p=[];let h=e;for(;Bw(h)&&d(h);){if(h=Iw(h),h===f){p.push(h);break}null!=h&&h===document.body&&kw(h)&&!kw(document.documentElement)||null!=h&&kw(h,c)&&p.push(h)}const g=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,v=null!=(i=null==(o=window.visualViewport)?void 0:o.height)?i:innerHeight,{scrollX:m,scrollY:y}=window,{height:b,width:E,top:w,right:C,bottom:D,left:A}=e.getBoundingClientRect(),{top:S,right:O,bottom:x,left:N}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let B="start"===s||"nearest"===s?w-S:"end"===s?D+x:w+b/2-S+x,T="center"===u?A+E/2-N+O:"end"===u?C+O:A-N;const k=[];for(let e=0;e<p.length;e++){const t=p[e],{height:n,width:r,top:o,right:i,bottom:l,left:c}=t.getBoundingClientRect();if("if-needed"===a&&w>=0&&A>=0&&D<=v&&C<=g&&(t===f&&!kw(t)||w>=o&&D<=l&&A>=c&&C<=i))return k;const d=getComputedStyle(t),h=parseInt(d.borderLeftWidth,10),S=parseInt(d.borderTopWidth,10),O=parseInt(d.borderRightWidth,10),x=parseInt(d.borderBottomWidth,10);let N=0,F=0;const I="offsetWidth"in t?t.offsetWidth-t.clientWidth-h-O:0,P="offsetHeight"in t?t.offsetHeight-t.clientHeight-S-x:0,R="offsetWidth"in t?0===t.offsetWidth?0:r/t.offsetWidth:0,_="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(f===t)N="start"===s?B:"end"===s?B-v:"nearest"===s?Fw(y,y+v,v,S,x,y+B,y+B+b,b):B-v/2,F="start"===u?T:"center"===u?T-g/2:"end"===u?T-g:Fw(m,m+g,g,h,O,m+T,m+T+E,E),N=Math.max(0,N+y),F=Math.max(0,F+m);else{N="start"===s?B-o-S:"end"===s?B-l+x+P:"nearest"===s?Fw(o,l,n,S,x+P,B,B+b,b):B-(o+n/2)+P/2,F="start"===u?T-c-h:"center"===u?T-(c+r/2)+I/2:"end"===u?T-i+O+I:Fw(c,i,r,h,O+I,T,T+E,E);const{scrollLeft:e,scrollTop:a}=t;N=0===_?0:Math.max(0,Math.min(a+N/_,t.scrollHeight-n/_+P)),F=0===R?0:Math.max(0,Math.min(e+F/R,t.scrollWidth-r/R+I)),B+=a-N,T+=e-F}k.push({el:t,top:N,left:F})}return k};function Rw(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(Pw(e,t));const r="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:o,top:i,left:a}of Pw(e,(e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"})(t))){const e=i-n.top+n.bottom,t=a-n.left+n.right;o.scroll({top:e,left:t,behavior:r})}}function _w(e){null!=e.selection&&(e.selection=null,e.onChange())}function Lw(e,t,n){void 0===n&&(n=!1);var r=t.selection,o=t.getConfig(),i=Iy.findDocumentOrShadowRoot(t).getSelection();if(i&&(!e.isComposing||n)&&t.isFocused()){var a="None"!==i.type;if(r||a){var s=xv.get(t),u=!1;if(s.contains(i.anchorNode)&&s.contains(i.focusNode)&&(u=!0),a&&u&&r){var l=Iy.toSlateRange(t,i,{exactMatch:!0,suppressThrow:!0});if(l&&Bp.equals(l,r)){var c=!0;if(Bp.isCollapsed(r)){var d=i.anchorNode,f=i.anchorOffset;if(d===s){var p=s.childNodes,h=void 0;(h=p[f])&&h.matches("table")&&(c=!1),(h=p[f-1])&&h.matches("table")&&(c=!1)}}if(c)return}}if(!r||Iy.hasRange(t,r)){e.isUpdatingSelection=!0;var g=r&&Iy.toDOMRange(t,r);if(g){Bp.isBackward(r)?i.setBaseAndExtent(g.endContainer,g.endOffset,g.startContainer,g.startOffset):i.setBaseAndExtent(g.startContainer,g.startOffset,g.endContainer,g.endOffset);var v=g.startContainer.parentElement;if(!v.closest("[data-slate-spacer]")&&g.getBoundingClientRect){var m=g.getBoundingClientRect.bind(g)();0===m.top&&0===m.right&&0===m.bottom&&0===m.left&&0===m.height&&0===m.width||(v.getBoundingClientRect=g.getBoundingClientRect.bind(g));var y=document.body;Rw(v,{scrollMode:"if-needed",boundary:o.scroll&&s.parentElement||y,block:"end",behavior:"smooth"}),delete v.getBoundingClientRect}}else i.removeAllRanges();setTimeout(function(){g&&Sy&&s.focus(),e.isUpdatingSelection=!1})}else t.selection=Iy.toSlateRange(t,i,{exactMatch:!1,suppressThrow:!1})}}}var Mw=new WeakMap,jw=new WeakMap;var Hw,zw={};var $w=function(){if(Hw)return zw;Hw=1,Object.defineProperty(zw,"__esModule",{value:!0});for(var e="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t={alt:"altKey",control:"ctrlKey",meta:"metaKey",shift:"shiftKey"},n={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:e?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},r={backspace:8,tab:9,enter:13,shift:16,control:17,alt:18,pause:19,capslock:20,escape:27," ":32,pageup:33,pagedown:34,end:35,home:36,arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,insert:45,delete:46,meta:91,numlock:144,scrolllock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=1;o<20;o++)r["f"+o]=111+o;function i(e,t,n){t&&!("byKey"in t)&&(n=t,t=null),Array.isArray(e)||(e=[e]);var r=e.map(function(e){return a(e,t)}),o=function(e){return r.some(function(t){return s(t,e)})};return null==n?o:o(n)}function a(e,o){var i=o&&o.byKey,a={},s=(e=e.replace("++","+add")).split("+"),c=s.length;for(var d in t)a[t[d]]=!1;var f=!0,p=!1,h=void 0;try{for(var g,v=s[Symbol.iterator]();!(f=(g=v.next()).done);f=!0){var m=g.value,y=m.endsWith("?")&&m.length>1;y&&(m=m.slice(0,-1));var b=l(m),E=t[b];if(m.length>1&&!E&&!n[m]&&!r[b])throw new TypeError('Unknown modifier: "'+m+'"');1!==c&&E||(i?a.key=b:a.which=u(m)),E&&(a[E]=!y||null)}}catch(e){p=!0,h=e}finally{try{!f&&v.return&&v.return()}finally{if(p)throw h}}return a}function s(e,t){for(var n in e){var r=e[n],o=void 0;if(null!=r&&((null!=(o="key"===n&&null!=t.key?t.key.toLowerCase():"which"===n?91===r&&93===t.which?91:t.which:t[n])||!1!==r)&&o!==r))return!1}return!0}function u(e){return e=l(e),r[e]||e.toUpperCase().charCodeAt(0)}function l(e){return e=e.toLowerCase(),e=n[e]||e}return zw.default=i,zw.isHotkey=i,zw.isCodeHotkey=function(e,t){return i(e,t)},zw.isKeyHotkey=function(e,t){return i(e,{byKey:!0},t)},zw.parseHotkey=a,zw.compareHotkey=s,zw.toKeyCode=u,zw.toKeyName=l,zw}(),Uw={bold:"mod+b",compose:["down","left","right","up","backspace","enter"],moveBackward:"left",moveForward:"right",moveWordBackward:"ctrl+left",moveWordForward:"ctrl+right",deleteBackward:"shift?+backspace",deleteForward:"shift?+delete",extendBackward:"shift+left",extendForward:"shift+right",italic:"mod+i",splitBlock:"shift?+enter",undo:"mod+z",tab:"tab",selectAll:"mod+a"},Vw={moveLineBackward:"opt+up",moveLineForward:"opt+down",moveWordBackward:"opt+left",moveWordForward:"opt+right",deleteBackward:["ctrl+backspace","ctrl+h"],deleteForward:["ctrl+delete","ctrl+d"],deleteLineBackward:"cmd+shift?+backspace",deleteLineForward:["cmd+shift?+delete","ctrl+k"],deleteWordBackward:"opt+shift?+backspace",deleteWordForward:"opt+shift?+delete",extendLineBackward:"opt+shift+up",extendLineForward:"opt+shift+down",redo:"cmd+shift+z",transposeCharacter:"ctrl+t"},Ww={deleteWordBackward:"ctrl+shift?+backspace",deleteWordForward:"ctrl+shift?+delete",redo:["ctrl+y","ctrl+shift+z"]},Gw=function(e){var t=Uw[e],n=Vw[e],r=Ww[e],o=t&&$w.isKeyHotkey(t),i=n&&$w.isKeyHotkey(n),a=r&&$w.isKeyHotkey(r);return function(e){return!(!o||!o(e))||(!!(Ay&&i&&i(e))||!(Ay||!a||!a(e)))}},qw={isBold:Gw("bold"),isCompose:Gw("compose"),isMoveBackward:Gw("moveBackward"),isMoveForward:Gw("moveForward"),isDeleteBackward:Gw("deleteBackward"),isDeleteForward:Gw("deleteForward"),isDeleteLineBackward:Gw("deleteLineBackward"),isDeleteLineForward:Gw("deleteLineForward"),isDeleteWordBackward:Gw("deleteWordBackward"),isDeleteWordForward:Gw("deleteWordForward"),isExtendBackward:Gw("extendBackward"),isExtendForward:Gw("extendForward"),isExtendLineBackward:Gw("extendLineBackward"),isExtendLineForward:Gw("extendLineForward"),isItalic:Gw("italic"),isMoveLineBackward:Gw("moveLineBackward"),isMoveLineForward:Gw("moveLineForward"),isMoveWordBackward:Gw("moveWordBackward"),isMoveWordForward:Gw("moveWordForward"),isRedo:Gw("redo"),isSplitBlock:Gw("splitBlock"),isTransposeCharacter:Gw("transposeCharacter"),isUndo:Gw("undo"),isTab:Gw("tab"),isSelectAll:Gw("selectAll")};function Kw(e){e.preventDefault()}var Yw={beforeinput:function(e,t,n){var r,o=e,i=n.getConfig().readOnly;if(Ty&&!i&&Ow(n,o.target)){null===(r=t.flushDOMSelectionChange)||void 0===r||r.call(t);var a=n.selection,s=o.inputType,u=o.dataTransfer||o.data||void 0;if("insertCompositionText"!==s&&"deleteCompositionText"!==s){if(o.preventDefault(),!s.startsWith("delete")||s.startsWith("deleteBy")){var l=Lg(o.getTargetRanges(),1)[0];if(l){var c=Iy.toSlateRange(n,l,{exactMatch:!1,suppressThrow:!1});a&&Bp.equals(a,c)||Wh.select(n,c)}}if(a&&Bp.isExpanded(a)){var d=Iy.getSelectedElems(n),f="table"===d[0].type,p="table-cell"!==d[d.length-1].type;if(f&&p)return;if(s.startsWith("delete")){var h=s.endsWith("Backward")?"backward":"forward";return void mh.deleteFragment(n,{direction:h})}}switch(s){case"deleteByComposition":case"deleteByCut":case"deleteByDrag":mh.deleteFragment(n);break;case"deleteContent":case"deleteContentForward":mh.deleteForward(n);break;case"deleteContentBackward":mh.deleteBackward(n);break;case"deleteEntireSoftLine":mh.deleteBackward(n,{unit:"line"}),mh.deleteForward(n,{unit:"line"});break;case"deleteHardLineBackward":mh.deleteBackward(n,{unit:"block"});break;case"deleteSoftLineBackward":mh.deleteBackward(n,{unit:"line"});break;case"deleteHardLineForward":mh.deleteForward(n,{unit:"block"});break;case"deleteSoftLineForward":mh.deleteForward(n,{unit:"line"});break;case"deleteWordBackward":mh.deleteBackward(n,{unit:"word"});break;case"deleteWordForward":mh.deleteForward(n,{unit:"word"});break;case"insertLineBreak":case"insertParagraph":mh.insertBreak(n);break;case"insertFromDrop":case"insertFromComposition":case"insertFromPaste":case"insertFromYank":case"insertReplacementText":case"insertText":if("insertFromComposition"===s&&(t.isComposing=!1,Lv.set(n,!0)),"insertFromPaste"===s&&!_v.get(n))break;"[object DataTransfer]"===_m(u)?n.insertData(u):"string"==typeof u&&mh.insertText(n,u)}}}},blur:function(e,t,n){var r=e,o=t.isUpdatingSelection,i=t.latestElement;if(!n.getConfig().readOnly&&!o&&Ow(n,r.target)){var a=Iy.findDocumentOrShadowRoot(n);if(i!==a.activeElement){var s=r.relatedTarget;if(!(s===Iy.toDOMNode(n,n)||$m(s)&&s.hasAttribute("data-slate-spacer"))){if(null!=s&&Hm(s)&&Iy.hasDOMNode(n,s)){var u=Iy.toSlateNode(n,s);if(kp.isElement(u)&&!n.isVoid(u))return}if(Oy){var l=a.getSelection();null==l||l.removeAllRanges()}Iv.delete(n)}}}},focus:function(e,t,n){var r=Iy.toDOMNode(n,n),o=Iy.findDocumentOrShadowRoot(n);t.latestElement=o.activeElement,Sy&&e.target!==r?r.focus():Iv.set(n,!0)},click:function(e,t,n){if(!n.getConfig().readOnly&&xw(n,e.target)&&Hm(e.target)){var r=Iy.toSlateNode(n,e.target),o=Iy.findPath(n,r);if(mh.hasPath(n,o))if(_p.get(n,o)===r){var i=mh.start(n,o),a=mh.end(n,o),s=mh.void(n,{at:i}),u=mh.void(n,{at:a});if(s&&u&&Cp.equals(s[1],u[1])){var l=mh.range(n,i);Wh.select(n,l)}}}},compositionstart:function(e,t,n){if(Ow(n,e.target)){Mv.delete(n);var r=n.selection;if(r&&Bp.isExpanded(r)&&(mh.deleteFragment(n),Promise.resolve().then(function(){Lw(t,n,!0)})),n.selection){var o=Iy.toDOMRange(n,n.selection).startContainer,i=o.textContent||"";Mw.set(n,i),jw.set(n,o)}t.isComposing=!0,function(e,t){var n;t.getConfig().placeholder&&t.isEmpty()&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}(t,n)}},compositionend:function(e,t,n){var r=e;if(Ow(n,r.target)){t.isComposing=!1;var o=!0===Lv.get(n);o?(Lv.delete(n),Mv.delete(n)):Mv.delete(n);var i=n.selection;if(null!=i){(By||Sy)&&Iy.cleanExposedTexNodeInSelectionBlock(n);for(var a=Bp.isBackward(i)?i.focus:i.anchor,s=Lg(mh.node(n,[a.path[0]]),1)[0],u=0;u<a.path.length;u+=1){var l=Lg(mh.node(n,a.path.slice(0,u+1)),1)[0];if(kp.isElement(l)&&((Oy||Sy)&&"link"===l.type||"code"===l.type)){Iy.setNewKey(s);break}}var c=r.data;if(c&&!o){if(n.getConfig().maxLength){var d=Iy.getLeftLengthOfMaxLength(n);if(d<c.length){var f=Iy.toDOMRange(n,i);f.startContainer.nodeType===Node.TEXT_NODE&&(f.startContainer.textContent=Mw.get(n)||""),d>0&&mh.insertText(n,c.slice(0,d)),t.changeViewState()}else mh.insertText(n,c)}else{var p=Iy.findDocumentOrShadowRoot(n).getSelection();p&&function(e,t){if(Bp.isCollapsed(t)){var n=t.anchor,r=t.focus;if([2,3].includes(n.path.length)&&[2,3].includes(r.path.length)&&(0===n.offset||0===r.offset)){var o=mh.node(e,n.path),i=0===n.offset?n.path:r.path,a=[i[0],i[1]-1];if(0===i[1])return!1;var s=mh.node(e,a);if(Nh.isText(s[0])&&Nh.isText(o[0]))return!0}}}(n,i)&&(n.selection=Iy.toSlateRange(n,p,{exactMatch:!1,suppressThrow:!1})),mh.insertText(n,c)}Oy||setTimeout(function(){var e=n.selection;if(null!=e){var t=jw.get(n);if(null!=t)Iy.toDOMRange(n,e).startContainer!==t&&(t.textContent=Mw.get(n)||"")}})}}}},compositionupdate:function(e,t,n){Ow(n,e.target)&&(t.isComposing=!0)},keydown:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&!t.isComposing&&Ow(n,r.target)){if(function(e,t){var n=pv.get(e),r=n&&n.getMenus(),o=gv.get(e),i=o&&o.getMenus(),a=Ig(Ig({},r),i);for(var s in a){var u=a[s],l=u.hotkey;if(l&&$w.isHotkey(l,t)&&!u.isDisabled(e)){var c=u.getValue(e);u.exec(e,c)}}}(n,r),qw.isTab(r))return Kw(r),void n.handleTab();if(qw.isRedo(r))return Kw(r),void("function"==typeof n.redo&&n.redo());if(qw.isUndo(r))return Kw(r),void("function"==typeof n.undo&&n.undo());if(qw.isMoveLineBackward(r))return Kw(r),void Wh.move(n,{unit:"line",reverse:!0});if(qw.isMoveLineForward(r))return Kw(r),void Wh.move(n,{unit:"line"});if(qw.isExtendLineBackward(r))return Kw(r),void Wh.move(n,{unit:"line",edge:"focus",reverse:!0});if(qw.isExtendLineForward(r))return Kw(r),void Wh.move(n,{unit:"line",edge:"focus"});if(qw.isMoveBackward(r))return Kw(r),void(o&&Bp.isCollapsed(o)?Wh.move(n,{reverse:!0}):Wh.collapse(n,{edge:"start"}));if(qw.isMoveForward(r))return Kw(r),void(o&&Bp.isCollapsed(o)?Wh.move(n):Wh.collapse(n,{edge:"end"}));if(qw.isMoveWordBackward(r))return Kw(r),o&&Bp.isExpanded(o)&&Wh.collapse(n,{edge:"focus"}),void Wh.move(n,{unit:"word",reverse:!0});if(qw.isMoveWordForward(r))return Kw(r),o&&Bp.isExpanded(o)&&Wh.collapse(n,{edge:"focus"}),void Wh.move(n,{unit:"word"});if(qw.isSelectAll(r))return Kw(r),void n.selectAll();if(Ty){if((By||Oy)&&o&&(qw.isDeleteBackward(r)||qw.isDeleteForward(r))&&Bp.isCollapsed(o)){var i=_p.parent(n,o.anchor.path);if(kp.isElement(i)&&mh.isVoid(n,i)&&mh.isInline(n,i))return r.preventDefault(),void Wh.delete(n,{unit:"block"})}}else{if(qw.isBold(r)||qw.isItalic(r)||qw.isTransposeCharacter(r))return void Kw(r);if(qw.isSplitBlock(r))return Kw(r),void mh.insertBreak(n);if(qw.isDeleteBackward(r))return Kw(r),void(o&&Bp.isExpanded(o)?mh.deleteFragment(n,{direction:"backward"}):mh.deleteBackward(n));if(qw.isDeleteForward(r))return Kw(r),void(o&&Bp.isExpanded(o)?mh.deleteFragment(n,{direction:"forward"}):mh.deleteForward(n));if(qw.isDeleteLineBackward(r))return Kw(r),void(o&&Bp.isExpanded(o)?mh.deleteFragment(n,{direction:"backward"}):mh.deleteBackward(n,{unit:"line"}));if(qw.isDeleteLineForward(r))return Kw(r),void(o&&Bp.isExpanded(o)?mh.deleteFragment(n,{direction:"forward"}):mh.deleteForward(n,{unit:"line"}));if(qw.isDeleteWordBackward(r))return Kw(r),void(o&&Bp.isExpanded(o)?mh.deleteFragment(n,{direction:"backward"}):mh.deleteBackward(n,{unit:"word"}));if(qw.isDeleteWordForward(r))return Kw(r),void(o&&Bp.isExpanded(o)?mh.deleteFragment(n,{direction:"forward"}):mh.deleteForward(n,{unit:"word"}))}}},keypress:function(e,t,n){if(!Ty&&!n.getConfig().readOnly&&Ow(n,e.target)){e.preventDefault();var r=e.key;mh.insertText(n,r)}},copy:function(e,t,n){var r=e;if(Ow(n,r.target)){n.getConfig().readOnly||r.preventDefault();var o=r.clipboardData;if(null!=o){n.setFragmentData(o);var i=n.getConfig().customCopy;i&&i(n,r)}}},cut:function(e,t,n){var r=e,o=n.selection;if(!n.getConfig().readOnly&&(r.preventDefault(),Ow(n,r.target))){var i=r.clipboardData;if(null!=i&&(n.setFragmentData(i),o))if(Bp.isExpanded(o))mh.deleteFragment(n);else{var a=_p.parent(n,o.anchor.path);kp.isElement(a)&&mh.isVoid(n,a)&&Wh.delete(n)}}},paste:function(e,t,n){_v.set(n,!0);var r=e;if(!n.getConfig().readOnly&&Ow(n,r.target)){var o=n.getConfig().customPaste;if(o)if(!1===o(n,r))return _v.set(n,!1),void r.preventDefault();if(Oy||!Ty||function(e){return e.clipboardData&&""!==e.clipboardData.getData("text/plain")&&1===e.clipboardData.types.length}(r)){r.preventDefault();var i=r.clipboardData;null!=i&&n.insertData(i)}}},dragover:function(e,t,n){if(xw(n,e.target)){var r=Iy.toSlateNode(n,e.target);kp.isElement(r)&&mh.isVoid(n,r)&&e.preventDefault()}},dragstart:function(e,t,n){var r=e;if(xw(n,r.target)&&!n.getConfig().readOnly){var o=Iy.toSlateNode(n,r.target),i=Iy.findPath(n,o);if(kp.isElement(o)&&mh.isVoid(n,o)||mh.void(n,{at:i,voids:!0})){var a=mh.range(n,i);Wh.select(n,a)}var s=r.dataTransfer;if(null!=s)Iy.getSelectedNodeByType(n,"table")||(t.isDraggingInternally=!0,n.setFragmentData(s))}},dragend:function(e,t,n){var r=e;n.getConfig().readOnly||t.isDraggingInternally&&xw(n,r.target)&&(t.isDraggingInternally=!1)},drop:function(e,t,n){var r=e,o=r.dataTransfer;if(!n.getConfig().readOnly&&xw(n,r.target)&&null!=o&&!(Ty&&Oy&&o.files.length>0)){r.preventDefault();var i=n.selection,a=Iy.findEventRange(n,r);Wh.select(n,a),t.isDraggingInternally&&(i&&Wh.delete(n,{at:i}),t.isDraggingInternally=!1),n.insertData(o),n.isFocused()||n.focus()}}};function Xw(e){if(Zw(e)){for(;e&&Zw(e);){e=Jw(e).parent}return null!=e?e:null}return e.parentNode}function Zw(e){return 11===e.nodeType}function Jw(e,t){var n,r,o;const i=e;return null!==(n=i.parent)&&void 0!==n||(i.parent=null!=t?t:null),null!==(r=i.firstChildNode)&&void 0!==r||(i.firstChildNode=e.firstChild),null!==(o=i.lastChildNode)&&void 0!==o||(i.lastChildNode=e.lastChild),i}const Qw={createElement:function(e,t){return document.createElement(e,t)},createElementNS:function(e,t,n){return document.createElementNS(e,t,n)},createTextNode:function(e){return document.createTextNode(e)},createDocumentFragment:function(){return Jw(document.createDocumentFragment())},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){if(Zw(e)){let t=e;for(;t&&Zw(t);){t=Jw(t).parent}e=null!=t?t:e}Zw(t)&&(t=Jw(t,e)),n&&Zw(n)&&(n=Jw(n).firstChildNode),e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){Zw(t)&&(t=Jw(t,e)),e.appendChild(t)},parentNode:Xw,nextSibling:function(e){var t;if(Zw(e)){const n=Jw(e),r=Xw(n);if(r&&n.lastChildNode){const e=Array.from(r.childNodes),o=e.indexOf(n.lastChildNode);return null!==(t=e[o+1])&&void 0!==t?t:null}return null}return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},getTextContent:function(e){return e.textContent},isElement:function(e){return 1===e.nodeType},isText:function(e){return 3===e.nodeType},isComment:function(e){return 8===e.nodeType},isDocumentFragment:Zw};function eC(e,t,n,r,o){return{sel:e,data:t,children:n,text:r,elm:o,key:void 0===t?void 0:t.key}}const tC=Array.isArray;function nC(e){return"string"==typeof e||"number"==typeof e||e instanceof String||e instanceof Number}const rC=eC("",{},[],void 0,void 0);function oC(e,t){var n,r;const o=e.key===t.key,i=(null===(n=e.data)||void 0===n?void 0:n.is)===(null===(r=t.data)||void 0===r?void 0:r.is),a=e.sel===t.sel,s=!(!e.sel&&e.sel===t.sel)||typeof e.text==typeof t.text;return a&&o&&i&&s}function iC(e,t,n){var r;const o={};for(let i=t;i<=n;++i){const t=null===(r=e[i])||void 0===r?void 0:r.key;void 0!==t&&(o[t]=i)}return o}const aC=["create","update","remove","destroy","pre","post"];function sC(e,t,n){const r={create:[],update:[],remove:[],destroy:[],pre:[],post:[]},o=Qw;for(const t of aC)for(const n of e){const e=n[t];void 0!==e&&r[t].push(e)}function i(e){const t=e.id?"#"+e.id:"",n=e.getAttribute("class"),r=n?"."+n.split(" ").join("."):"";return eC(o.tagName(e).toLowerCase()+t+r,{},[],void 0,e)}function a(e){return eC(void 0,{},[],void 0,e)}function s(e,t){return function(){if(0===--t){const t=o.parentNode(e);null!==t&&o.removeChild(t,e)}}}function u(e,t){var n,i,a;let s;const l=e.data,c=null==l?void 0:l.hook;null===(n=null==c?void 0:c.init)||void 0===n||n.call(c,e);const d=e.children,f=e.sel;if("!"===f)null!==(i=e.text)&&void 0!==i||(e.text=""),e.elm=o.createComment(e.text);else if(""===f)e.elm=o.createTextNode(e.text);else if(void 0!==f){const n=f.indexOf("#"),i=f.indexOf(".",n),p=n>0?n:f.length,h=i>0?i:f.length,g=-1!==n||-1!==i?f.slice(0,Math.min(p,h)):f,v=null==l?void 0:l.ns,m=void 0===v?o.createElement(g,l):o.createElementNS(v,g,l);for(e.elm=m,p<h&&m.setAttribute("id",f.slice(p+1,h)),i>0&&m.setAttribute("class",f.slice(h+1).replace(/\./g," ")),s=0;s<r.create.length;++s)r.create[s](rC,e);if(!nC(e.text)||tC(d)&&0!==d.length||o.appendChild(m,o.createTextNode(e.text)),tC(d))for(s=0;s<d.length;++s){const e=d[s];null!=e&&o.appendChild(m,u(e,t))}void 0!==c&&(null===(a=c.create)||void 0===a||a.call(c,rC,e),void 0!==c.insert&&t.push(e))}else e.elm=o.createTextNode(e.text);return e.elm}function l(e,t,n,r,i,a){for(;r<=i;++r){const i=n[r];null!=i&&o.insertBefore(e,u(i,a),t)}}function c(e){var t,n;const o=e.data;if(void 0!==o){null===(n=null===(t=null==o?void 0:o.hook)||void 0===t?void 0:t.destroy)||void 0===n||n.call(t,e);for(let t=0;t<r.destroy.length;++t)r.destroy[t](e);if(void 0!==e.children)for(let t=0;t<e.children.length;++t){const n=e.children[t];null!=n&&"string"!=typeof n&&c(n)}}}function d(e,t,n,i){for(var a,u;n<=i;++n){let i;const l=t[n];if(null!=l)if(void 0!==l.sel){c(l),i=r.remove.length+1;const e=s(l.elm,i);for(let t=0;t<r.remove.length;++t)r.remove[t](l,e);const t=null===(u=null===(a=null==l?void 0:l.data)||void 0===a?void 0:a.hook)||void 0===u?void 0:u.remove;void 0!==t?t(l,e):e()}else l.children?(c(l),d(e,l.children,0,l.children.length-1)):o.removeChild(e,l.elm)}}function f(e,t,n){var i,a,s,c,p,h,g,v;const m=null===(i=t.data)||void 0===i?void 0:i.hook;null===(a=null==m?void 0:m.prepatch)||void 0===a||a.call(m,e,t);const y=t.elm=e.elm;if(e===t)return;if(void 0!==t.data||void 0!==t.text&&t.text!==e.text){null!==(s=t.data)&&void 0!==s||(t.data={}),null!==(c=e.data)&&void 0!==c||(e.data={});for(let n=0;n<r.update.length;++n)r.update[n](e,t);null===(g=null===(h=null===(p=t.data)||void 0===p?void 0:p.hook)||void 0===h?void 0:h.update)||void 0===g||g.call(h,e,t)}const b=e.children,E=t.children;void 0===t.text?void 0!==b&&void 0!==E?b!==E&&function(e,t,n,r){let i,a,s,c,p=0,h=0,g=t.length-1,v=t[0],m=t[g],y=n.length-1,b=n[0],E=n[y];for(;p<=g&&h<=y;)null==v?v=t[++p]:null==m?m=t[--g]:null==b?b=n[++h]:null==E?E=n[--y]:oC(v,b)?(f(v,b,r),v=t[++p],b=n[++h]):oC(m,E)?(f(m,E,r),m=t[--g],E=n[--y]):oC(v,E)?(f(v,E,r),o.insertBefore(e,v.elm,o.nextSibling(m.elm)),v=t[++p],E=n[--y]):oC(m,b)?(f(m,b,r),o.insertBefore(e,m.elm,v.elm),m=t[--g],b=n[++h]):(void 0===i&&(i=iC(t,p,g)),a=i[b.key],void 0===a?(o.insertBefore(e,u(b,r),v.elm),b=n[++h]):void 0===i[E.key]?(o.insertBefore(e,u(E,r),o.nextSibling(m.elm)),E=n[--y]):(s=t[a],s.sel!==b.sel?o.insertBefore(e,u(b,r),v.elm):(f(s,b,r),t[a]=void 0,o.insertBefore(e,s.elm,v.elm)),b=n[++h]));h<=y&&(c=null==n[y+1]?null:n[y+1].elm,l(e,c,n,h,y,r)),p<=g&&d(e,t,p,g)}(y,b,E,n):void 0!==E?(void 0!==e.text&&o.setTextContent(y,""),l(y,null,E,0,E.length-1,n)):void 0!==b?d(y,b,0,b.length-1):void 0!==e.text&&o.setTextContent(y,""):e.text!==t.text&&(void 0!==b&&d(y,b,0,b.length-1),o.setTextContent(y,t.text)),null===(v=null==m?void 0:m.postpatch)||void 0===v||v.call(m,e,t)}return function(e,t){let n,s,l;const c=[];for(n=0;n<r.pre.length;++n)r.pre[n]();for(!function(e,t){return e.isElement(t)}(o,e)?function(e,t){return e.isDocumentFragment(t)}(o,e)&&(e=a(e)):e=i(e),oC(e,t)?f(e,t,c):(s=e.elm,l=o.parentNode(s),u(t,c),null!==l&&(o.insertBefore(l,t.elm,o.nextSibling(s)),d(l,[e],0,0))),n=0;n<c.length;++n)c[n].data.hook.insert(c[n]);for(n=0;n<r.post.length;++n)r.post[n]();return t}}function uC(e,t,n){if(e.ns="http://www.w3.org/2000/svg","foreignObject"!==n&&void 0!==t)for(let e=0;e<t.length;++e){const n=t[e];if("string"==typeof n)continue;const r=n.data;void 0!==r&&uC(r,n.children,n.sel)}}function lC(e,t,n){let r,o,i,a={};if(void 0!==n?(null!==t&&(a=t),tC(n)?r=n:nC(n)?o=n.toString():n&&n.sel&&(r=[n])):null!=t&&(tC(t)?r=t:nC(t)?o=t.toString():t&&t.sel?r=[t]:a=t),void 0!==r)for(i=0;i<r.length;++i)nC(r[i])&&(r[i]=eC(void 0,void 0,void 0,r[i],void 0));return!e.startsWith("svg")||3!==e.length&&"."!==e[3]&&"#"!==e[3]||uC(a,r,e),eC(e,a,r,o,void 0)}function cC(e,t){let n;const r=t.elm;let o=e.data.attrs,i=t.data.attrs;if((o||i)&&o!==i){for(n in o=o||{},i=i||{},i){const e=i[n];o[n]!==e&&(!0===e?r.setAttribute(n,""):!1===e?r.removeAttribute(n):120!==n.charCodeAt(0)?r.setAttribute(n,e):58===n.charCodeAt(3)?r.setAttributeNS("http://www.w3.org/XML/1998/namespace",n,e):58===n.charCodeAt(5)?109===n.charCodeAt(1)?r.setAttributeNS("http://www.w3.org/2000/xmlns/",n,e):r.setAttributeNS("http://www.w3.org/1999/xlink",n,e):r.setAttribute(n,e))}for(n in o)n in i||r.removeAttribute(n)}}const dC={create:cC,update:cC};function fC(e,t){let n,r;const o=t.elm;let i=e.data.class,a=t.data.class;if((i||a)&&i!==a){for(r in i=i||{},a=a||{},i)i[r]&&!Object.prototype.hasOwnProperty.call(a,r)&&o.classList.remove(r);for(r in a)n=a[r],n!==i[r]&&o.classList[n?"add":"remove"](r)}}const pC={create:fC,update:fC},hC=/[A-Z]/g;function gC(e,t){const n=t.elm;let r,o=e.data.dataset,i=t.data.dataset;if(!o&&!i)return;if(o===i)return;o=o||{},i=i||{};const a=n.dataset;for(r in o)r in i||(a?r in a&&delete a[r]:n.removeAttribute("data-"+r.replace(hC,"-$&").toLowerCase()));for(r in i)o[r]!==i[r]&&(a?a[r]=i[r]:n.setAttribute("data-"+r.replace(hC,"-$&").toLowerCase(),i[r]))}const vC={create:gC,update:gC};function mC(e,t,n){if("function"==typeof e)e.call(t,n,t);else if("object"==typeof e)for(let r=0;r<e.length;r++)mC(e[r],t,n)}function yC(e,t){const n=e.type,r=t.data.on;r&&r[n]&&mC(r[n],t,e)}function bC(e,t){const n=e.data.on,r=e.listener,o=e.elm,i=t&&t.data.on,a=t&&t.elm;let s;if(n!==i){if(n&&r)if(i)for(s in n)i[s]||o.removeEventListener(s,r,!1);else for(s in n)o.removeEventListener(s,r,!1);if(i){const r=t.listener=e.listener||function e(t){yC(t,e.vnode)};if(r.vnode=t,n)for(s in i)n[s]||a.addEventListener(s,r,!1);else for(s in i)a.addEventListener(s,r,!1)}}}const EC={create:bC,update:bC,destroy:bC};function wC(e,t){let n,r,o;const i=t.elm;let a=e.data.props,s=t.data.props;if((a||s)&&a!==s)for(n in a=a||{},s=s||{},s)r=s[n],o=a[n],o===r||"value"===n&&i[n]===r||(i[n]=r)}const CC={create:wC,update:wC},DC="function"==typeof(null===window||void 0===window?void 0:window.requestAnimationFrame)?window.requestAnimationFrame.bind(window):setTimeout;let AC=!1;function SC(e,t,n){var r;r=()=>{e[t]=n},DC(()=>{DC(r)})}function OC(e,t){let n,r;const o=t.elm;let i=e.data.style,a=t.data.style;if(!i&&!a)return;if(i===a)return;i=i||{},a=a||{};const s="delayed"in i;for(r in i)r in a||("-"===r[0]&&"-"===r[1]?o.style.removeProperty(r):o.style[r]="");for(r in a)if(n=a[r],"delayed"===r&&a.delayed)for(const e in a.delayed)n=a.delayed[e],s&&n===i.delayed[e]||SC(o.style,e,n);else"remove"!==r&&n!==i[r]&&("-"===r[0]&&"-"===r[1]?o.style.setProperty(r,n):o.style[r]=n)}const xC={pre:function(){AC=!1},create:OC,update:OC,destroy:function(e){let t,n;const r=e.elm,o=e.data.style;if(o&&(t=o.destroy))for(n in t)r.style[n]=t[n]},remove:function(e,t){const n=e.data.style;if(!n||!n.remove)return void t();let r;AC||(e.elm.offsetLeft,AC=!0);const o=e.elm;let i=0;const a=n.remove;let s=0;const u=[];for(r in a)u.push(r),o.style[r]=a[r];const l=getComputedStyle(o)["transition-property"].split(", ");for(;i<l.length;++i)-1!==u.indexOf(l[i])&&s++;o.addEventListener("transitionend",e=>{e.target===o&&--s,0===s&&t()})}};function NC(e,t){for(const n of e)null!=n&&!1!==n&&""!==n&&(Array.isArray(n)?NC(n,t):"string"==typeof n||"number"==typeof n||"boolean"==typeof n?t.push(eC(void 0,void 0,void 0,String(n),void 0)):t.push(n));return t}function BC(e,t,...n){const r=NC(n,[]);return"function"==typeof e?e(t,r):1===r.length&&!r[0].sel&&r[0].text?lC(e,t,r[0].text):lC(e,t,r)}var TC=[];var kC,FC,IC={};function PC(e,t,n){return BC(n.isInline(e)?"span":"div",null,t)}function RC(e,t){var n,r=Iy.findKey(t,e),o=t.isInline(e),i=mh.isVoid(t,e),a=py(e.type,r.id),s={id:a,key:r.id,"data-slate-node":"element","data-slate-inline":o},u=e.type,l=e.children,c=void 0===l?[]:l,d=function(e){return IC[e]||PC}(u);n=i?null:c.map(function(n,r){return jC(n,r,e,t)});var f=d(e,n,t);if(i){s["data-slate-void"]=!0;var p=o?"span":"div",h=Lg(_p.texts(e),1),g=Lg(h[0],1)[0],v=BC(p,{"data-slate-spacer":!0,style:{height:"0",color:"transparent",outline:"none",position:"absolute"}},jC(g,0,e,t));f=BC(p,{style:{position:"relative"}},f,v),Sv.set(g,0),Ov.set(g,e)}return null==f.data&&(f.data={}),Object.assign(f.data,s),i||o||(f=function(e,t){var n=t;return TC.forEach(function(r){n=r(e,t)}),n}(e,f)),Im(function(){var t=Wm(a);null!=t&&(Bv.set(r,t),Tv.set(e,t),Nv.set(t,e))}),f}function _C(e,t){return void 0===t&&(t=!1),BC("span",{"data-slate-string":!0},t?e+"\n":e)}function LC(e,t){return void 0===e&&(e=0),void 0===t&&(t=!1),BC("span",{"data-slate-zero-width":t?"n":"z","data-slate-length":e},"\ufeff",t?BC("br",null):null)}function MC(e,t,n){if(null==e.text)throw new Error("Current node is not slate Text ".concat(JSON.stringify(e)));var r=Iy.findKey(n,e),o=n.getConfig().decorate;if(null==o)throw new Error("Can not get config.decorate");var i,a=Iy.findPath(n,e),s=o([e,a]),u=Nh.decorations(e,s),l=u.map(function(r){var o,i,a,s=r.leaf,l=r.position,c=function(e,t,n,r,o){void 0===t&&(t=!1);var i=e.text,a=Iy.findPath(o,n),s=Cp.parent(a);if(mh.isEditor(r))throw new Error("Text node ".concat(JSON.stringify(n)," parent is Editor"));return o.isVoid(r)?LC(_p.string(r).length):""!==i||r.children[r.children.length-1]!==n||o.isInline(r)||""!==mh.string(o,s)?""===i?LC():t&&"\n"===i.slice(-1)?_C(i,!0):_C(i):LC(0,!0)}(s,null!==(o=null==l?void 0:l.isLast)&&void 0!==o?o:1===u.length,e,t,n);return i=s,a=c,TC.forEach(function(e){a=e(i,a)}),BC("span",{"data-slate-leaf":!0},c=a)}),c=(i=r.id,"w-e-text-".concat(i)),d=BC("span",{"data-slate-node":"text",id:c,key:r.id},l);return Im(function(){var t=Wm(c);null!=t&&(Bv.set(r,t),Tv.set(e,t),Nv.set(t,e))}),d}function jC(e,t,n,r){return Sv.set(e,t),Ov.set(e,n),kp.isElement(e)?RC(e,r):MC(e,n,r)}var HC=function(){if(FC)return kC;FC=1;var e,t="[object Symbol]",n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,r=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,o="\\ud800-\\udfff",i="\\u0300-\\u036f\\ufe20-\\ufe23",a="\\u20d0-\\u20f0",s="\\u2700-\\u27bf",u="a-z\\xdf-\\xf6\\xf8-\\xff",l="A-Z\\xc0-\\xd6\\xd8-\\xde",c="\\ufe0e\\ufe0f",d="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",f="['’]",p="["+o+"]",h="["+d+"]",g="["+i+a+"]",v="\\d+",m="["+s+"]",b="["+u+"]",E="[^"+o+d+v+s+u+l+"]",w="\\ud83c[\\udffb-\\udfff]",C="[^"+o+"]",D="(?:\\ud83c[\\udde6-\\uddff]){2}",A="[\\ud800-\\udbff][\\udc00-\\udfff]",S="["+l+"]",O="\\u200d",x="(?:"+b+"|"+E+")",N="(?:"+S+"|"+E+")",B="(?:['’](?:d|ll|m|re|s|t|ve))?",T="(?:['’](?:D|LL|M|RE|S|T|VE))?",k="(?:"+g+"|"+w+")"+"?",F="["+c+"]?",I=F+k+("(?:"+O+"(?:"+[C,D,A].join("|")+")"+F+k+")*"),P="(?:"+[m,D,A].join("|")+")"+I,R="(?:"+[C+g+"?",g,D,A,p].join("|")+")",_=RegExp(f,"g"),L=RegExp(g,"g"),M=RegExp(w+"(?="+w+")|"+R+I,"g"),j=RegExp([S+"?"+b+"+"+B+"(?="+[h,S,"$"].join("|")+")",N+"+"+T+"(?="+[h,S+x,"$"].join("|")+")",S+"?"+x+"+"+B,S+"+"+T,v,P].join("|"),"g"),H=RegExp("["+O+o+i+a+c+"]"),z=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,$="object"==typeof y&&y&&y.Object===Object&&y,U="object"==typeof self&&self&&self.Object===Object&&self,V=$||U||Function("return this")(),W=(e={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"ss"},function(t){return null==e?void 0:e[t]});function G(e){return H.test(e)}function q(e){return G(e)?function(e){return e.match(M)||[]}(e):function(e){return e.split("")}(e)}var K=Object.prototype.toString,Y=V.Symbol,X=Y?Y.prototype:void 0,Z=X?X.toString:void 0;function J(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&K.call(e)==t}(e))return Z?Z.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}function Q(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r<o;)i[r]=e[r+t];return i}(e,t,n)}function ee(e){return null==e?"":J(e)}var te,ne,re=(te=function(e,t,n){return t=t.toLowerCase(),e+(n?function(e){return oe(ee(e).toLowerCase())}(t):t)},function(e){return function(e,t,n){for(var r=-1,o=e?e.length:0;++r<o;)n=t(n,e[r],r,e);return n}(function(e,t){return e=ee(e),void 0===t?function(e){return z.test(e)}(e)?function(e){return e.match(j)||[]}(e):function(e){return e.match(n)||[]}(e):e.match(t)||[]}(function(e){return(e=ee(e))&&e.replace(r,W).replace(L,"")}(e).replace(_,"")),te,"")}),oe=(ne="toUpperCase",function(e){var t=G(e=ee(e))?q(e):void 0,n=t?t[0]:e.charAt(0),r=t?Q(t,1).join(""):e.slice(1);return n[ne]()+r});return kC=re}(),zC=b(HC);var $C=["props","attrs","style","dataset","on","hook"];function UC(e){var t=e.data,n=void 0===t?{}:t,r=e.children,o=void 0===r?[]:r;Object.keys(n).forEach(function(t){var r,o,i=n[t];if("key"!==t){if(!$C.includes(t)){if(t.startsWith("data-")){var a=t.slice(5);return a=zC(a),function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.dataset&&(n.dataset={});Object.assign(n.dataset,t)}(e,((r={})[a]=i,r)),void delete n[t]}!function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.props&&(n.props={});Object.assign(n.props,t)}(e,(o={},o[t]=i,o)),delete n[t]}}else e.key=i}),o.length>0&&o.forEach(function(e){"string"!=typeof e&&UC(e)})}function VC(e,t){var n,r,o=e.$scroll,i=(n=e.id,"w-e-textarea-".concat(n)),a=t.getConfig(),s=a.readOnly,u=a.autoFocus,l=function(e,t){return void 0===t&&(t=!1),lC("div#".concat(e),{props:{contentEditable:!t}})}(i,s),c=t.children||[];l.children=c.map(function(e,n){if(Dv.has(e)){var r=Dv.get(e);if(r){var o=Lg(r,2),i=o[0],a=o[1];if(a)return i!==n&&(Sv.set(e,n),Dv.set(e,[n,a])),a}}var s=jC(e,n,t,t);UC(s);var u=t.getConfig().skipCacheTypes,l=void 0===u?["list-item"]:u;return kp.isElement(e)&&l.includes(e.type)||Dv.set(e,[n,s]),s});var d=Ev.get(e);if(null==d&&(d=!0),d){var f=function(e){return Zv('<div\n id="'.concat(e,'"\n data-slate-editor\n data-slate-node="value"\n suppressContentEditableWarning\n role="textarea"\n spellCheck="true"\n autoCorrect="true"\n autoCapitalize="true"\n ></div>'))}(i);o.append(f),e.$textArea=f,r=f[0],(h=sC([pC,CC,xC,vC,EC,dC]))(r,l),Ev.set(e,!1),wv.set(e,h)}else{var p=Cv.get(e),h=wv.get(e);if(null==p||null==h)return;r=p.elm,h(p,l)}if(null!=r||null!=(r=Wm(i))){var g;if((d?u:t.isFocused())&&r.focus({preventScroll:!0}),d){var v=(g=r)&&g.ownerDocument&&g.ownerDocument.defaultView||null;v&&Fv.set(t,v)}xv.set(t,r),Tv.set(t,r),Nv.set(r,t),Cv.set(e,l)}}var WC=1,GC=function(){function e(e){var t=this;this.selectionChangeRoot=null,this.destroyed=!1,this.id=WC++,this.$textArea=null,this.$progressBar=Zv('<div class="w-e-progress-bar"></div>'),this.$maxLengthInfo=Zv('<div class="w-e-max-length-info"></div>'),this.isComposing=!1,this.isUpdatingSelection=!1,this.isDraggingInternally=!1,this.latestElement=null,this.showPlaceholder=!1,this.$placeholder=null,this.latestEditorSelection=null,this.onDOMSelectionChange=Sw(function(e){var n=$m(null==e?void 0:e.target)?e.target:null,r=null==n?void 0:n.tagName;if("INPUT"!==r&&"TEXTAREA"!==r){var o=t.getActiveEditor();null!=o&&function(e,t){var n=e.isComposing,r=e.isUpdatingSelection,o=e.isDraggingInternally,i=t.getConfig();if(!r&&!o){var a=Iy.findDocumentOrShadowRoot(t),s=a.activeElement,u=Iy.toDOMNode(t,t),l=a.getSelection();if(s!==u)return Iv.delete(t),void _w(t);if(e.latestElement=s,Iv.set(t,!0),!l)return _w(t);var c=l.anchorNode,d=l.focusNode,f=Nw(t,c),p=xw(t,d);if(!n)if(f&&p){var h=Iy.toSlateRange(t,l,{exactMatch:!1,suppressThrow:!0});h&&Wh.select(t,h)}else i.readOnly&&_w(t)}}(t,o)}},100);var n=Zv(e);if(0===n.length)throw new Error("Cannot find textarea DOM by selector '".concat(e,"'"));this.$box=n;var r=Zv('<div class="w-e-text-container"></div>');r.append(this.$progressBar),r.append(this.$maxLengthInfo),n.append(r);var o=Zv('<div class="w-e-scroll"></div>');r.append(o),this.$scroll=o,this.$textAreaContainer=r,Im(function(){var e=t.getActiveEditor();if(null!=e){t.bindSelectionChange(e),r.on("click",function(){return e.hidePanelOrModal()}),e.on(nv,t.changeViewState.bind(t));var o=e.getConfig(),i=o.onChange,a=o.scroll;i&&e.on(nv,function(){return i(e)}),a||(n.css("position","relative"),r.addClass("no-scroll")),t.onFocusAndOnBlur(),e.on(nv,t.changeMaxLengthInfo.bind(t)),t.bindEvent()}})}return Object.defineProperty(e.prototype,"editorInstance",{get:function(){var e=dv.get(this);if(null==e)throw new Error("Can not get editor instance");return e},enumerable:!1,configurable:!0}),e.prototype.getActiveEditor=function(){if(this.destroyed)return null;var e=dv.get(this);return null==e||e.isDestroyed?null:e},e.prototype.bindSelectionChange=function(e,t){var n=this;if(void 0===t&&(t=5),null==this.selectionChangeRoot&&!e.isDestroyed){try{var r=Iy.findDocumentOrShadowRoot(e);r.addEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=r}catch(r){if(t>0)return void setTimeout(function(){return n.bindSelectionChange(e,t-1)},0);window.document.addEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=window.document}e.on(tv,function(){var e;null===(e=n.selectionChangeRoot)||void 0===e||e.removeEventListener("selectionchange",n.onDOMSelectionChange),n.selectionChangeRoot=null})}},e.prototype.flushDOMSelectionChange=function(){this.onDOMSelectionChange.flush()},e.prototype.bindEvent=function(){var e=this,t=this.$textArea,n=this.$scroll,r=this.editorInstance;null!=t&&(qg(Yw,function(n,o){t.on(o,function(t){n(t,e,r)})}),r.getConfig().scroll&&(n.css("overflow-y","auto"),n.on("scroll",Sw(function(){r.emit(rv)},100))))},e.prototype.onFocusAndOnBlur=function(){var e=this,t=this.getActiveEditor();if(null!=t){var n=t.getConfig(),r=n.onBlur,o=n.onFocus;this.latestEditorSelection=t.selection,t.on(nv,function(){null==e.latestEditorSelection&&null!=t.selection?setTimeout(function(){e.destroyed||t.isDestroyed||o&&o(t)}):null!=e.latestEditorSelection&&null==t.selection&&setTimeout(function(){e.destroyed||t.isDestroyed||r&&r(t)}),e.latestEditorSelection=t.selection})}},e.prototype.changeMaxLengthInfo=function(){var e=this.getActiveEditor();if(null!=e){var t=e.getConfig().maxLength;if(t){var n=t-Iy.getLeftLengthOfMaxLength(e);this.$maxLengthInfo[0].innerHTML="".concat(n,"/").concat(t)}}},e.prototype.changeProgress=function(e){var t=this.$progressBar;t.css("width","".concat(e,"%")),e>=100&&setTimeout(function(){t.hide(),t.css("width","0"),t.show()},1e3)},e.prototype.changeViewState=function(){var e=this,t=this.getActiveEditor();null!=t&&(VC(this,t),function(e,t){var n,r=t.getConfig().placeholder;if(r){var o=t.isEmpty();if(o&&!e.showPlaceholder&&!e.isComposing){if(null==e.$placeholder){var i=Zv('<div class="w-e-text-placeholder">'.concat(r,"</div>"));e.$textAreaContainer.append(i),e.$placeholder=i}return e.$placeholder.show(),void(e.showPlaceholder=!0)}!o&&e.showPlaceholder&&(null===(n=e.$placeholder)||void 0===n||n.hide(),e.showPlaceholder=!1)}}(this,t),Im(function(){e.destroyed||t.isDestroyed||Lw(e,t)}))},e.prototype.destroy=function(){var e;this.destroyed=!0,this.onDOMSelectionChange.cancel(),null===(e=this.selectionChangeRoot)||void 0===e||e.removeEventListener("selectionchange",this.onDOMSelectionChange),this.selectionChangeRoot=null,this.$textAreaContainer.remove()},e}();function qC(e,t,n,r){if(Sv.set(e,t),Ov.set(e,n),kp.isElement(e)){var o=e.children;if((void 0===o?[]:o).forEach(function(t,n){return qC(t,n,e,r)}),mh.isVoid(r,e)){var i=Lg(_p.texts(e),1),a=Lg(i[0],1)[0];Sv.set(a,0),Ov.set(a,e)}}}function KC(e){var t=e.selector,n=void 0===t?"":t,r=e.config,o=void 0===r?{}:r,i=e.content,a=e.html,s=e.plugins,u=void 0===s?[]:s,l=function(e){return[Wb,xb,jv,Sb,tE,Vb,Kb,Ng].reduce(function(e,t){return t(e)},e)}(Cg());if(n&&function(e,t){return dy(e,"data-w-e-textarea",t)}(l,n))throw new Error("Repeated create editor by selector '".concat(n,"'"));var c=function(e){void 0===e&&(e={});var t=Wg(Qg),n={},r=e.MENU_CONF,o=void 0===r?{}:r;return qg(t,function(e,t){n[t]=Ig(Ig({},e),o[t]||{})}),delete e.MENU_CONF,Ig({scroll:!0,readOnly:!1,autoFocus:!0,decorate:function(){return[]},maxLength:0,MENU_CONF:n,hoverbarKeys:{},sanitizeHtml:Jg,customAlert:function(e,t){window.alert("".concat(t,":\n").concat(e))}},e)}(o);bv.set(l,c);var d=c.hoverbarKeys,f=void 0===d?{}:d;if(u.forEach(function(e){l=e(l)}),function(e,t){var n=t.html,r=t.content;null!=n?e.children=fy(e,n):r&&r.length&&(e.children=r),0===e.children.length&&(e.children=[{type:"paragraph",children:[{text:""}]}])}(l,{html:a,content:i}),n){var p=new GC(n);cv.set(l,p),dv.set(p,l),p.changeViewState();var h=void 0;Object.keys(f).length>0&&(h=new Dw,hv.set(h,l),gv.set(l,h)),l.on(nv,function(){l.hidePanelOrModal()}),l.on(rv,function(){l.hidePanelOrModal()})}else l.children.forEach(function(e,t){return qC(e,t,l,l)});var g=c.onCreated,v=c.onDestroyed;return g&&l.on(ev,function(){return g(l)}),v&&l.on(tv,function(){return v(l)}),Im(function(){return l.emit(ev)}),l}var YC=function(){function e(e,t){var n=this;this.$toolbar=Zv('<div class="w-e-bar w-e-bar-show w-e-toolbar"></div>'),this.menus={},this.toolbarItems=[],this.config={},this.lngListen=function(){},this.changeToolbarState=rE(function(){n.toolbarItems.forEach(function(e){e.changeMenuState()})},200),this.config=t;var r=Zv(e);if(0===r.length)throw new Error("Cannot find toolbar DOM by selector '".concat(e,"'"));this.$box=r;var o=this.$toolbar;o.on("mousedown",function(e){return e.preventDefault()},{passive:!1}),r.append(o),Im(function(){n.initToolbar(),n.lngListen=JE(function(){return n.initToolbar()}),n.getEditorInstance().on(nv,n.changeToolbarState)})}return e.prototype.getMenus=function(){return this.menus},e.prototype.getConfig=function(){return this.config},e.prototype.initToolbar=function(){this.menus={};var e=this.$toolbar;null==e||e.empty(),this.registerItems(),this.changeToolbarState()},e.prototype.registerItems=function(){var e=this,t="",n=this.$toolbar,r=this.config,o=r.toolbarKeys,i=void 0===o?[]:o,a=r.insertKeys,s=void 0===a?{index:0,keys:[]}:a,u=r.excludeKeys,l=void 0===u?[]:u,c=Wg(i),d=[];d=Array.isArray(s)?s:[s];var f=0;d.forEach(function(e){var t=e.index+f;if(e.replaceFn&&c[t]){var n=e.replaceFn(c[t]);if(!n)throw new Error("This function needs to return the menu configuration:string | IMenuGroup");c[t]=n}e.keys.length>0&&("string"==typeof e.keys&&(e.keys=[e.keys]),e.keys.forEach(function(e,n){c.splice(t+n,0,e)}),f+=e.keys.length)});var p=c.filter(function(e){var t="string"==typeof e?e:e.key;return!l.includes(t)}),h=p.length;p.forEach(function(r,o){if("|"===r){if(0===o)return;if(o+1===h)return;if("|"===t)return;var i=nw();return n.append(i),void(t=r)}if("string"==typeof r)return e.registerSingleItem(r,e),void(t=r);e.registerGroup(r),t="group"})},e.prototype.registerGroup=function(e){var t=this,n=this.$toolbar,r=function(e){return new vw(e)}(e),o=e.menuKeys,i=void 0===o?[]:o,a=this.config.excludeKeys,s=void 0===a?[]:a;i.forEach(function(e){s.includes(e)||t.registerSingleItem(e,r)}),n.append(r.$elem)},e.prototype.registerSingleItem=function(e,t){var n=this.getEditorInstance(),r=t instanceof vw,o=this.menus,i=o[e];if(null==i){var a=uv[e];if(null==a)throw new Error("Not found menu item factory by key '".concat(e,"'"));if("function"!=typeof a)throw new Error("Menu item factory (key='".concat(e,"') is not a function"));i=a(),o[e]=i}else console.warn("Duplicated toolbar menu key '".concat(e,"'\n重复注册了菜单栏 menu '").concat(e,"'"));var s=n.getMenuConfig(e);s&&void 0!==s.iconSvg&&(i.iconSvg=s.iconSvg);var u=bw(e,i,r);(this.toolbarItems.push(u),vv.set(u,n),r)?t.appendBarItem(u):t.$toolbar.append(u.$elem)},e.prototype.getEditorInstance=function(){var e=fv.get(this);if(null==e)throw new Error("Can not get editor instance");return e},e.prototype.destroy=function(){var e;this.$toolbar.remove(),null===(e=this.lngListen)||void 0===e||e.call(this),this.menus={},this.toolbarItems=[]},e}();function XC(e,t){if(null==e)throw new Error("Cannot create toolbar, because editor is null");var n=t.selector,r=t.config,o=void 0===r?{}:r;if(function(e,t){return dy(e,"data-w-e-toolbar",t)}(e,n))throw new Error("Repeated create toolbar by selector '".concat(n,"'"));var i=Ig({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},o||{}),a=new YC(n,i);return fv.set(a,e),pv.set(e,a),a}var ZC,JC,QC,eD,tD,nD={exports:{}},rD={};function oD(){if(QC)return rD;QC=1,Object.defineProperty(rD,"__esModule",{value:!0}),rD.justErrorsLogger=rD.debugLogger=void 0;const e=function(){if(JC)return ZC;function e(e){return e<10?`0${e}`:e.toString()}return JC=1,ZC=function(){const t=new Date;return`${e(t.getHours())}:${e(t.getMinutes())}:${e(t.getSeconds())}`}}(),t={debug:()=>{},warn:()=>{},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.error(`[Uppy] [${e()}]`,...n)}};rD.justErrorsLogger=t;const n={debug:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.debug(`[Uppy] [${e()}]`,...n)},warn:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.warn(`[Uppy] [${e()}]`,...n)},error:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return console.error(`[Uppy] [${e()}]`,...n)}};return rD.debugLogger=n,rD}function iD(){if(tD)return eD;tD=1;return eD={nanoid:(e=21)=>{let t="",n=0|e;for(;n--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(n=t)=>{let r="",o=0|n;for(;o--;)r+=e[Math.random()*e.length|0];return r}},eD}var aD,sD,uD,lD,cD,dD,fD,pD,hD,gD,vD,mD,yD,bD,ED,wD,CD,DD,AD,SD,OD,xD,ND,BD,TD,kD,FD,ID,PD,RD,_D,LD={};function MD(){return sD?aD:(sD=1,aD=function(e){if("number"!=typeof e||isNaN(e))throw new TypeError("Expected a number, got "+typeof e);var t=e<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return(t?"-":"")+e+" B";var r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1);e=Number(e/Math.pow(1024,r));var o=n[r];return e>=10||e%1==0?(t?"-":"")+e.toFixed(0)+" "+o:(t?"-":"")+e.toFixed(1)+" "+o})}function jD(){if(lD)return uD;function e(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}return lD=1,e.prototype.match=function(e){var t,n,r=!0,o=this.parts,i=o.length;if("string"==typeof e||e instanceof String)if(this.hasWild||this.text==e){for(n=(e||"").split(this.separator),t=0;r&&t<i;t++)"*"!==o[t]&&(r=t<n.length&&o[t]===n[t]);r=r&&n}else r=!1;else if("function"==typeof e.splice)for(r=[],t=e.length;t--;)this.match(e[t])&&(r[r.length]=e[t]);else if("object"==typeof e)for(var a in r={},e)this.match(a)&&(r[a]=e[a]);return r},uD=function(t,n,r){var o=new e(t,r||/[\/\.]/);return void 0!==n?o.match(n):o},uD}function HD(){if(fD)return LD;fD=1,Object.defineProperty(LD,"__esModule",{value:!0}),LD.defaultOptions=LD.RestrictionError=LD.Restricter=void 0;const e=MD(),t=function(){if(dD)return cD;dD=1;var e=jD(),t=/[\/\+\.]/;return cD=function(n,r){function o(r){var o=e(r,n,t);return o&&o.length>=2}return r?o(r.split(";")[0]):o}}();LD.defaultOptions={maxFileSize:null,minFileSize:null,maxTotalFileSize:null,maxNumberOfFiles:null,minNumberOfFiles:null,allowedFileTypes:null,requiredMetaFields:[]};class n extends Error{constructor(){super(...arguments),this.isRestriction=!0}}LD.RestrictionError=n,"undefined"==typeof AggregateError&&(globalThis.AggregateError=class extends Error{constructor(e,t){super(t),this.errors=e}});return LD.Restricter=class{constructor(e,t){this.i18n=t,this.getOpts=()=>{const t=e();if(null!=t.restrictions.allowedFileTypes&&!Array.isArray(t.restrictions.allowedFileTypes))throw new TypeError("`restrictions.allowedFileTypes` must be an array");return t}}validate(r,o){const{maxFileSize:i,minFileSize:a,maxTotalFileSize:s,maxNumberOfFiles:u,allowedFileTypes:l}=this.getOpts().restrictions;if(u){const e=o.filter(e=>!e.isGhost);if(e.length+1>u)throw new n(`${this.i18n("youCanOnlyUploadX",{smart_count:u})}`)}if(l){if(!l.some(e=>e.includes("/")?!!r.type&&t(r.type.replace(/;.*?$/,""),e):!("."!==e[0]||!r.extension)&&r.extension.toLowerCase()===e.slice(1).toLowerCase())){const e=l.join(", ");throw new n(this.i18n("youCanOnlyUploadFileTypes",{types:e}))}}if(s&&null!=r.size){const t=o.reduce((e,t)=>e+t.size,r.size);if(t>s)throw new n(this.i18n("exceedsSize",{size:e(s),file:r.name}))}if(i&&null!=r.size&&r.size>i)throw new n(this.i18n("exceedsSize",{size:e(i),file:r.name}));if(a&&null!=r.size&&r.size<a)throw new n(this.i18n("inferiorSize",{size:e(a)}))}validateMinNumberOfFiles(e){const{minNumberOfFiles:t}=this.getOpts().restrictions;if(Object.keys(e).length<t)throw new n(this.i18n("youHaveToAtLeastSelectX",{smart_count:t}))}getMissingRequiredMetaFields(e){const t=new n(this.i18n("missingRequiredMetaFieldOnFile",{fileName:e.name})),{requiredMetaFields:r}=this.getOpts().restrictions,o=Object.prototype.hasOwnProperty,i=[];for(const t of r)o.call(e.meta,t)&&""!==e.meta[t]||i.push(t);return{missingFields:i,error:t}}},LD}function zD(){if(hD)return pD;return hD=1,pD=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}function $D(){if(vD)return gD;function e(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw new TypeError("attempted to use private field on non-instance");return e}vD=1;var t=0;function n(e){return"__private_"+t+++"_"+e}const r=zD();function o(e,t,n){const r=[];return e.forEach(e=>"string"!=typeof e?r.push(e):t[Symbol.split](e).forEach((e,t,o)=>{""!==e&&r.push(e),t<o.length-1&&r.push(n)})),r}
|
|
2
2
|
/**
|
|
3
3
|
* Takes a string with placeholder variables like `%{smart_count} file selected`
|
|
4
4
|
* and replaces it with values from options `{smart_count: 5}`
|
|
@@ -17,5 +17,5 @@ var e,t,n,r,o,i,a,s,u,l,c,d,f,p,h,g,v,m,y="undefined"!=typeof globalThis?globalT
|
|
|
17
17
|
* @author Lea Verou <https://lea.verou.me>
|
|
18
18
|
* @namespace
|
|
19
19
|
* @public
|
|
20
|
-
*/e.exports&&(e.exports=t),void 0!==y&&(y.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:t.languages[n]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:o},t.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(void 0!==t&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},n="data-src-status",r="loading",o="loaded",i="pre[data-src]:not(["+n+'="'+o+'"]):not(['+n+'="'+r+'"])';t.hooks.add("before-highlightall",function(e){e.selector+=", "+i}),t.hooks.add("before-sanity-check",function(a){var s=a.element;if(s.matches(i)){a.code="",s.setAttribute(n,r);var u=s.appendChild(document.createElement("CODE"));u.textContent="Loading…";var l=s.getAttribute("data-src"),c=a.language;if("none"===c){var d=(/\.(\w+)$/.exec(l)||[,"none"])[1];c=e[d]||d}t.util.setLanguage(u,c),t.util.setLanguage(s,c);var f=t.plugins.autoloader;f&&f.loadLanguages(c),function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?t(r.responseText):r.status>=400?n("✖ Error "+r.status+" while fetching file: "+r.statusText):n("✖ Error: File does not exist or is empty"))},r.send(null)}(l,function(e){s.setAttribute(n,o);var r=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],o=t[3];return r?o?[n,Number(o)]:[n,void 0]:[n,n]}}(s.getAttribute("data-range"));if(r){var i=e.split(/\r\n?|\n/g),a=r[0],l=null==r[1]?i.length:r[1];a<0&&(a+=i.length),a=Math.max(0,Math.min(a-1,i.length)),l<0&&(l+=i.length),l=Math.max(0,Math.min(l,i.length)),e=i.slice(a,l).join("\n"),s.hasAttribute("data-start")||s.setAttribute("data-start",String(a+1))}u.textContent=e,t.highlightElement(u)},function(e){s.setAttribute(n,"failed"),u.textContent=e})}}),t.plugins.fileHighlight={highlight:function(e){for(var n,r=(e||document).querySelectorAll(i),o=0;n=r[o++];)t.highlightElement(n)}};var a=!1;t.fileHighlight=function(){a||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),a=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}}()}(AB)),AB.exports),OB=b(SB);!function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function i(e,t){return e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return o}),RegExp(e,t)}o=i(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=i(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:i(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:i(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var a=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(a).join(""):""},s=function(t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=!1;if("string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===a(o.content[0].content[1])&&n.pop():"/>"===o.content[o.content.length-1].content||n.push({tagName:a(o.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&n.length>0&&0===n[n.length-1].openedBraces){var u=a(o);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(u+=a(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(u=a(t[r-1])+u,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",u,null,u)}o.content&&"string"!=typeof o.content&&s(o.content)}};e.hooks.add("after-tokenize",function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)})}(Prism);var xB;xB||(xB=1,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)),Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"];var NB;NB||(NB=1,function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,i=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:o,punctuation:i};var a={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},s=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:a}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:a}}];e.languages.insertBefore("php","variable",{string:s,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:s,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:o,punctuation:i}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")})}(Prism)),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean;var BB;BB||(BB=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python);var TB;TB||(TB=1,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism));var kB;kB||(kB=1,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism));var FB;FB||(FB=1,function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+t[+n]+")"})}function n(e,n,r){return RegExp(t(e,n),"")}function r(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,function(){return"(?:"+e+")"});return e.replace(/<<self>>/g,"[^\\s\\S]")}var o="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface record struct",a="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",s="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function u(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var l=u(i),c=RegExp(u(o+" "+i+" "+a+" "+s)),d=u(i+" "+a+" "+s),f=u(o+" "+i+" "+s),p=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),h=r(/\((?:[^()]|<<self>>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,v=t(/<<0>>(?:\s*<<1>>)?/.source,[g,p]),m=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,v]),y=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[m,y]),E=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[p,h,y]),w=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[E]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[w,m,y]),D={keyword:c,punctuation:/[<>()?,.:[\]]/},A=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,S=/"(?:\\.|[^\\"\r\n])*"/.source,O=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[O]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[m]),lookbehind:!0,inside:D},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,C]),lookbehind:!0,inside:D},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[l,v]),lookbehind:!0,inside:D},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[m]),lookbehind:!0,inside:D},{pattern:n(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:D},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,f,g]),inside:D}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[g]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:D},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[C,m]),inside:D,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[C]),lookbehind:!0,inside:D,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,p]),inside:{function:n(/^<<0>>/.source,[g]),generic:{pattern:RegExp(p),alias:"class-name",inside:D}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[l,v,g,C,c.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[v,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:c,"class-name":{pattern:RegExp(C),greedy:!0,inside:D},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var x=S+"|"+A,N=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[x]),B=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[N]),2),T=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,k=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[m,B]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[T,k]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[T]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[B]),inside:e.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var F=/:[^}\r\n]+/.source,I=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[N]),2),P=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[I,F]),R=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[x]),2),_=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[R,F]);function L(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,F]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[P]),lookbehind:!0,greedy:!0,inside:L(P,I)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[_]),lookbehind:!0,greedy:!0,inside:L(_,R)}],char:{pattern:RegExp(A),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism)),Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"],Prism.languages.vba=Prism.languages["visual-basic"],Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};var IB;IB||(IB=1,function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism)),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift}),function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=r.variable[1].inside,a=0;a<o.length;a++)i[o[a]]=e.languages.bash[o[a]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(Prism),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var o=t[n];if("code"===o.type){var i=o.content[1],a=o.content[3];if(i&&a&&"code-language"===i.type&&"code-block"===a.type&&"string"==typeof i.content){var s=i.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),u="language-"+(s=(/[a-z][\w-]*/i.exec(s)||[""])[0].toLowerCase());a.alias?"string"==typeof a.alias?a.alias=[a.alias,u]:a.alias.push(u):a.alias=[u]}}else e(o.content)}}(e.tokens)}),e.hooks.add("wrap",function(t){if("code-block"===t.type){for(var n="",r=0,o=t.classes.length;r<o;r++){var i=t.classes[r],l=/language-(.+)/.exec(i);if(l){n=l[1];break}}var c=e.languages[n];if(c)t.content=e.highlight(function(e){var t=e.replace(a,"");return t=t.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(e,t){var n;if("#"===(t=t.toLowerCase())[0])return n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),u(n);var r=s[t];return r||e}),t}(t.content),c,n);else if(n&&"none"!==n&&e.plugins.autoloader){var d="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=d,e.plugins.autoloader.loadLanguages(n,function(){var t=document.getElementById(d);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})}}});var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism),Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/},function(e){var t={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.groovy=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),t.inside.expression.inside=e.languages.groovy}(Prism),Prism.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/};var PB=["comment","prolog","doctype","cdata","punctuation","namespace","property","tag","boolean","number","constant","symbol","deleted","selector","attr-name","string","builtin","inserted","operator","entity","url","string","atrule","attr-value","keyword","function","class-name","regex","important","variable","bold","italic","entity","char"];function RB(e){return"string"==typeof e?e.length:"string"==typeof e.content?e.content.length:e.content.reduce(function(e,t){return e+RB(t)},0)}var _B=function(e){var t,n,r,o=Lg(e,2),i=o[0],a=o[1],s=[],u=function(e){if(!Nh.isText(e))return null;var t=Iy.getParentNode(null,e);if(t&&"code"===Iy.getNodeType(t)){var n=Iy.getParentNode(null,t);if(n&&"pre"===Iy.getNodeType(n))return t}return null}(i);if(null==u)return s;var l=u.language,c=void 0===l?"":l;if(!c)return s;var d=function(e,t){if(!t)return[];var n=OB.languages[t];return n?OB.tokenize(e.text,n):[]}(i,c),f=0;try{for(var p=_g(d),h=p.next();!h.done;h=p.next()){var g=h.value,v=f+RB(g);"string"!=typeof g&&s.push(((r={})[g.type]=!0,r.anchor={path:a,offset:f},r.focus={path:a,offset:v},r)),f=v}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}return s};var LB={type:"code",elemToHtml:function(e,t){var n=e.language,r=void 0===n?"":n,o=r?'class="language-'.concat(r,'"'):"";return"<code ".concat(o,">").concat(t,"</code>")}};var MB=function(){function e(){this.title=QE("highLightModule.selectLang"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 64v896h896V64H64z m487.6 698.8c0 87.2-51.2 127-125.8 127-67.4 0-106.4-34.8-126.4-77l68.6-41.4c13.2 23.4 25.2 43.2 54.2 43.2 27.6 0 45.2-10.8 45.2-53V475.4h84.2v287.4z m199.2 127c-78.2 0-128.8-37.2-153.4-86l68.6-39.6c18 29.4 41.6 51.2 83 51.2 34.8 0 57.2-17.4 57.2-41.6 0-28.8-22.8-39-61.4-56l-21-9c-60.8-25.8-101-58.4-101-127 0-63.2 48.2-111.2 123.2-111.2 53.6 0 92 18.6 119.6 67.4L800 580c-14.4-25.8-30-36-54.2-36-24.6 0-40.2 15.6-40.2 36 0 25.2 15.6 35.4 51.8 51.2l21 9c71.6 30.6 111.8 62 111.8 132.4 0 75.6-59.6 117.2-139.4 117.2z"></path></svg>',this.tag="select",this.width=95,this.selectPanelWidth=115,this.defaultCodeLang=""}return e.prototype.getOptions=function(e){var t=this,n=[],r=e.getMenuConfig("codeSelectLang").codeLangs,o=void 0===r?[]:r;n.push({text:"plain text",value:""}),o.forEach(function(e){var r=e.text,o=e.value;e.selected&&(t.defaultCodeLang=o),n.push({text:r,value:o})});var i=this.getValue(e);return n.forEach(function(e){e.value===i?e.selected=!0:e.selected=void 0}),n},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.getSelectCodeElem(e);if(null==t)return this.defaultCodeLang;if(!kp.isElement(t))return this.defaultCodeLang;var n=t.language.toString(),r=e.getMenuConfig("codeSelectLang").codeLangs;return(void 0===r?[]:r).some(function(e){return e.value===n})?n:this.defaultCodeLang},e.prototype.isDisabled=function(e){return null==e.selection||!this.getSelectCodeElem(e)},e.prototype.exec=function(e,t){if(null!=this.getSelectCodeElem(e)){var n={language:t.toString()};Wh.setNodes(e,n,{match:function(e){return Iy.checkNodeType(e,"code")}})}},e.prototype.getSelectCodeElem=function(e){var t=Iy.getSelectedNodeByType(e,"code");if(null==t)return null;var n=Iy.getParentNode(e,t);return kp.isElement(n)?"pre"!==n.type?null:t:null},e}(),jB={key:"codeSelectLang",factory:function(){return new MB},config:{codeLangs:[{text:"CSS",value:"css"},{text:"HTML",value:"html"},{text:"XML",value:"xml"},{text:"Javascript",value:"javascript"},{text:"Typescript",value:"typescript"},{text:"JSX",value:"jsx"},{text:"Go",value:"go"},{text:"PHP",value:"php"},{text:"C",value:"c"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C++",value:"cpp"},{text:"C#",value:"csharp"},{text:"Visual Basic",value:"visual-basic"},{text:"SQL",value:"sql"},{text:"Ruby",value:"ruby"},{text:"Swift",value:"swift"},{text:"Bash",value:"bash"},{text:"Lua",value:"lua"},{text:"Groovy",value:"groovy"},{text:"Markdown",value:"markdown"},{text:"ABAP",value:"abap"}]}};tm&&(Zv.fn.attr=tm);var HB={renderStyle:function(e,t){var n=e,r=t,o="";return PB.forEach(function(e){n[e]&&(o=e)}),o&&function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.props&&(n.props={}),Object.assign(n.props,{className:t})}(r,o="token ".concat(o)),r},parseStyleHtml:function(e,t,n){var r=Zv(e);if(!kp.isElement(t))return t;if("code"!==Iy.getNodeType(t))return t;var o=t,i=r.attr("class")||"";return 0===i.indexOf("language-")?o.language=i.split("-")[1]||"":o.language=i.toLowerCase(),o},menus:[jB],elemsToHtml:[LB]};YE("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),YE("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var zB=new WeakMap;function $B(e){var t,n=e.children||[],r=n.length;if(0===r)return"";for(var o=0;o<r&&!t;o+=1){var i=n[o];Nh.isText(i)&&(t=i)}return null==t?"":t.color||""}function UB(e,t,n){for(var r=t.type,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["type"]),i=void 0!==n?n:o.level||0,a=Iy.findPath(e,t);;){if(0===a.length||0===a[a.length-1])return null;a=Cp.previous(a);var s=mh.node(e,a);if(!s)return null;var u=Lg(s,1)[0],l=u.level,c=void 0===l?0:l;if(Iy.getNodeType(u)!==r)return null;if(c===i)return u}}function VB(e,t,n){var r=UB(e,t,n);return!!r&&r.ordered===t.ordered}var WB=[];var GB={type:"list-item",elemToHtml:function(e,t){var n="",r="",o=e.ordered,i=void 0!==o&&o?"ol":"ul",a=function(e){var t=zB.get(e);if(null==t)return 0;var n=e,r=n.type,o=n.ordered,i=void 0!==o&&o,a=n.level,s=void 0===a?0:a,u=Iy.findPath(t,e);if(0===u[0])return s+1;var l=Cp.previous(u),c=mh.node(t,l);if(!c)return 0;var d=Lg(c,1)[0];if(Iy.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,h=void 0!==p&&p,g=f.level,v=void 0===g?0:g;return v<s?s-v:v>s?VB(t,e)?0:1:v===s?h===i?0:1:0}(e);if(a>0)for(var s=0;s<a;s+=1)n+="<".concat(i,">"),WB.push(i);var u=function(e){var t=zB.get(e);if(null==t)return 0;var n=e,r=n.type,o=n.ordered,i=void 0!==o&&o,a=n.level,s=void 0===a?0:a,u=Iy.findPath(t,e);if(u[0]===t.children.length-1)return s+1;var l=Cp.next(u),c=mh.node(t,l);if(!c)return 0;var d=Lg(c,1)[0];if(Iy.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,h=void 0!==p&&p,g=f.level,v=void 0===g?0:g;return v<s?VB(t,d)?s-v:s-v+1:v>s?0:v===s?h===i?0:1:0}(e);if(u>0)for(s=0;s<u;s+=1){var l=WB.pop();r+="</".concat(l,">")}var c=$B(e),d=c?' style="color:'.concat(c,'"'):"";return{html:"<li".concat(d,">").concat(t,"</li>"),prefix:n,suffix:r}}},qB=function(){function e(){this.type="list-item",this.tag="button"}return e.prototype.getListNode=function(e){var t=this.type;return Iy.getSelectedNodeByType(e,t)},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){var t=this.getListNode(e);if(null==t)return!1;var n=t.ordered;return(void 0!==n&&n)===this.ordered},e.prototype.isDisabled=function(e){return null==e.selection||!!Iy.getSelectedElems(e).some(function(t){if(mh.isVoid(e,t)&&mh.isBlock(e,t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)})},e.prototype.exec=function(e,t){this.isActive(e)?Wh.setNodes(e,{type:"paragraph",ordered:void 0,level:void 0}):Wh.setNodes(e,{type:"list-item",ordered:this.ordered,indent:void 0})},e}(),KB=function(e){function t(){var t=e.apply(this,Mg([],Lg(arguments),!1))||this;return t.ordered=!1,t.title=QE("listModule.unOrderedList"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',t}return Fg(t,e),t}(qB),YB=function(e){function t(){var t=e.apply(this,Mg([],Lg(arguments),!1))||this;return t.ordered=!0,t.title=QE("listModule.orderedList"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',t}return Fg(t,e),t}(qB),XB={key:"bulletedList",factory:function(){return new KB}},ZB={key:"numberedList",factory:function(){return new YB}};function JB(e){return e.length?e[0].tagName.toLowerCase():""}bm&&(Zv.fn.append=bm),tm&&(Zv.fn.attr=tm),wm&&(Zv.fn.parent=wm);var QB={selector:"li:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Zv(e);0===(t=t.filter(function(e){return!!Nh.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=function(e){return"ol"===JB(e.parent())}(r),i=function(e){for(var t=0,n=e.parent(),r=JB(n);"ul"===r||"ol"===r;)r=JB(n=n.parent()),t+=1;return t-1}(r);return{type:"list-item",ordered:o,level:i,children:t}}};var eT={selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(e,t,n){return t.flat(1/0)}};function tT(e){return mh.nodes(e,{at:e.selection||void 0,match:function(t){return 1===Iy.findPath(e,t).length}})}var nT={type:"list-item",renderElem:function(e,t,n){zB.set(e,n);var r=e,o=r.level,i=void 0===o?0:o,a=r.ordered,s=void 0!==a&&a,u={margin:"5px 0 5px ".concat(20*i,"px"),display:"flex",alignItems:"flex-start"},l="";if(s){var c=function(e,t){var n=t,r=n.type,o=n.level,i=void 0===o?0:o,a=n.ordered,s=void 0!==a&&a,u=1,l=t,c=Iy.findPath(e,l);if(0===c[0])return 1;for(;c[0]>0;){var d=Cp.previous(c),f=mh.node(e,d);if(null==f)break;var p=f[0],h=p.level,g=void 0===h?0:h,v=p.type,m=p.ordered;if(v!==r)break;if(g<i)break;if(g===i){if(m!==s)break;u+=1}l=p,c=d}return u}(n,e);l="".concat(c,".")}else l=function(e){void 0===e&&(e=0);var t="";switch(e){case 0:t="•";break;case 1:t="◦";break;default:t="▪"}return t}(i);return BC("div",{style:u},BC("span",{contentEditable:!1,style:{marginRight:"0.5em",color:$B(e)},"data-w-e-reserve":!0},l),BC("span",{style:{flex:"1",wordBreak:"break-word"}},t))}},rT={renderElems:[nT],editorPlugin:function(e){var t=e.deleteBackward,n=e.handleTab,r=e.normalizeNode,o=e.insertBreak,i=e;return i.insertBreak=function(){var t=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"list-item")},universal:!0}),1),n=t[0];return n?""!==n[0].children[0].text?o():void Wh.setNodes(i,{type:"paragraph",ordered:void 0,level:void 0}):o()},i.deleteBackward=function(n){var r=i.selection;if(null!=r)if(Bp.isExpanded(r))t(n);else{var o=Iy.getSelectedNodeByType(i,"list-item");if(null!=o)if(0!==r.focus.offset)t(n);else{var a=o,s=a.level,u=void 0===s?0:s,l=a.ordered,c=void 0!==l&&l;if(u>0){var d=UB(e,o,u-1);d&&d.ordered!==c?Wh.setNodes(i,{level:u-1,ordered:!c}):Wh.setNodes(i,{level:u-1})}else Wh.setNodes(i,{type:"paragraph",ordered:void 0,level:void 0})}else t(n)}else t(n)},i.handleTab=function(){var e,t,r,o,a=i.selection;if(null!=a){if(Bp.isCollapsed(a)){var s=Iy.getSelectedNodeByType(i,"list-item");if(null==s)return void n();if(0===a.focus.offset){var u=s.level,l=void 0===u?0:u;return void Wh.setNodes(i,{level:l+1})}}if(Bp.isExpanded(a)){var c=0,d=!1;try{for(var f=_g(tT(i)),p=f.next();!p.done;p=f.next()){var h=Lg(p.value,1)[0];"list-item"===Iy.getNodeType(h)?c+=1:d=!0}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}if(d||c<=1)return void n();try{for(var g=_g(tT(i)),v=g.next();!v.done;v=g.next()){var m=Lg(v.value,2),y=(h=m[0],m[1]),b=h.level;l=void 0===b?0:b;Wh.setNodes(i,{level:l+1},{at:y})}}catch(e){r={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}}else n()}else n()},i.normalizeNode=function(e){var t=Lg(e,2),n=t[0],o=t[1],a=Iy.getNodeType(n);return"bulleted-list"!==a&&"numbered-list"!==a||Wh.unwrapNodes(i,{at:o}),r([n,o])},i},menus:[XB,ZB],elemsToHtml:[GB],parseElemsHtml:[eT,QB]};YE("en",{tableModule:{modal:{border:"Border",borderWidth:"Width",bgColor:"Back color",align:"Text Align",ok:"OK"},color:{default:"Default color",clear:"Clear back color"},borderStyle:{none:"None",solid:"Solid",dotted:"Dotted",dashed:"Dashed",double:"Double",groove:"Groove",ridge:"Ridge",inset:"Inset",outset:"Outset"},deleteCol:"Delete column",deleteRow:"Delete row",deleteTable:"Delete table",widthAuto:"Fit width",insertCol:"Insert column",insertRow:"Insert row",insertTable:"Insert table",header:"Header",mergeCell:"merge cell",splitCell:"split cell",tableProperty:"Table property",cellProperty:"Cell property"}}),YE("zh-CN",{tableModule:{modal:{border:"边框",borderWidth:"宽度",bgColor:"背景色",align:"对齐方式",ok:"确定"},color:{default:"默认颜色",clear:"清除背景色"},borderStyle:{none:"无样式",solid:"实线",dotted:"点状虚线",dashed:"虚线",double:"双线",groove:"凹槽边框",ridge:"菱形边框",inset:"凹边框",outset:"凸边框"},deleteCol:"删除列",deleteRow:"删除行",deleteTable:"删除表格",widthAuto:"适应宽度",insertCol:"插入列",insertRow:"插入行",insertTable:"插入表格",header:"表头",mergeCell:"合并单元格",splitCell:"拆分单元格",tableProperty:"表格属性",cellProperty:"单元格属性"}});var oT={type:"table",elemToHtml:function(e,t){var n=e,r=n.width,o=void 0===r?"auto":r,i=n.columnWidths,a=n.height,s=void 0===a?"auto":a,u=null==i?void 0:i.map(function(e){return"<col width=".concat(e,"></col>")}).join(""),l=u?'<colgroup contentEditable="false">'.concat(u,"</colgroup>"):"";return'<table style="width: '.concat(o,";table-layout: fixed;height:").concat(s,'">').concat(l,"<tbody>").concat(t,"</tbody></table>")}},iT={type:"table-row",elemToHtml:function(e,t){var n=e.height,r=n?' style="height: '.concat(n,'px"'):"";return"<tr".concat(r,">").concat(t,"</tr>")}},aT={type:"table-cell",elemToHtml:function(e,t){var n=e,r=n.colSpan,o=void 0===r?1:r,i=n.rowSpan,a=void 0===i?1:i,s=n.isHeader,u=void 0!==s&&s,l=n.width,c=void 0===l?"auto":l,d=n.hidden;if(void 0!==d&&d)return"";var f=u?"th":"td";return"<".concat(f,' colSpan="').concat(o,'" rowSpan="').concat(a,'" width="').concat(c,'">').concat(t,"</").concat(f,">")}},sT='<svg viewBox="0 0 1024 1024"><path d="M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z"></path></svg>',uT={blocks:{td:"table-cell",th:"table-cell",content:"paragraph",tr:"table-row",table:"table",tbody:"table-body"}};function lT(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=uT,o=t.map(function(e){var t;return null===(t=null==r?void 0:r.blocks)||void 0===t?void 0:t[e]});return function(e){return function(e){return!mh.isEditor(e)&&kp.isElement(e)&&"type"in e}(e)&&o.includes(e.type)}}function cT(e,t){for(var n=Lg(t,2),r=n[0],o=n[1],i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=Lg(_p.common(e,r,o),2),u=s[0],l=s[1];return!!lT.apply(void 0,Mg([e],Lg(i),!1))(u,l)||!!mh.above(e,{match:lT.apply(void 0,Mg([e],Lg(i),!1)),at:l})}function dT(e,t){var n,r;void 0===t&&(t={});var o=[];try{for(var i=_g(function(e,t){var n,r,o,i,a,s,u,l,c,d,f,p,h,g,v,m,y,b;return void 0===t&&(t={}),Rg(this,function(E){switch(E.label){case 0:if(n=Lg(mh.nodes(e,{match:lT(e,"table"),at:t.at}),1),!(r=n[0]))return[2,[]];o=Lg(r,2),i=o[1],E.label=1;case 1:E.trys.push([1,6,7,8]),a=_g(mh.nodes(e,{match:lT(e,"table"),at:i})),s=a.next(),E.label=2;case 2:if(s.done)return[3,5];u=Lg(s.value,2),l=u[1],c=[];try{for(y=void 0,d=_g(mh.nodes(e,{match:lT(e,"tr"),at:l})),f=d.next();!f.done;f=d.next())p=Lg(f.value,2),h=p[1],c.push(Mg([],Lg(mh.nodes(e,{match:lT(e,"th","td"),at:h})),!1))}catch(e){y={error:e}}finally{try{f&&!f.done&&(b=d.return)&&b.call(d)}finally{if(y)throw y.error}}return[4,c];case 3:E.sent(),E.label=4;case 4:return s=a.next(),[3,2];case 5:return[3,8];case 6:return g=E.sent(),v={error:g},[3,8];case 7:try{s&&!s.done&&(m=a.return)&&m.call(a)}finally{if(v)throw v.error}return[7];case 8:return[2]}})}(e,{at:t.at})),a=i.next();!a.done;a=i.next()){for(var s=a.value,u=[],l=0,c=0;c<s.length;c+=1)s[c]&&(l=Math.max(l,s[c].length));for(c=0;c<s.length;c+=1)if(u[c]||(u[c]=[]),s[c])for(var d=0;d<s[c].length;d+=1)if(s[c][d]&&s[c][d][0]){for(var f=Lg(s[c][d],1)[0],p=f.rowSpan,h=void 0===p?1:p,g=f.colSpan,v=void 0===g?1:g,m=d;u[c]&&u[c][m];)m+=1;for(var y=0;y<v;y+=1)for(var b=0;b<h;b+=1){var E=c+b,w=m+y;u[E]||(u[E]=[]),u[E][w]||(u[E][w]=[s[c][d],{rtl:y+1,ltr:v-y,ttb:b+1,btt:h-b}])}}o.push.apply(o,Mg([],Lg(u),!1))}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}var fT=function(){function e(e,t){this.x=e,this.y=t}return e.valueOf=function(e,t){return new this(e,t)},e.equals=function(e,t){return e.x===t.x&&e.y===t.y},e}();function pT(e){return e.length?e[0].tagName.toLowerCase():""}function hT(e,t){for(var n="",r=(e.attr("style")||"").split(";"),o=r.length,i=0;i<o;i+=1){var a=r[i];if(a){var s=a.split(":");s[0].trim()===t&&(n=s[1].trim())}}return n}bm&&Zv.fn&&(Zv.fn.append=bm),am&&Zv.fn&&(Zv.fn.on=am),Tm&&Zv.fn&&(Zv.fn.focus=Tm),tm&&Zv.fn&&(Zv.fn.attr=tm),im&&Zv.fn&&(Zv.fn.val=im),vm&&Zv.fn&&(Zv.fn.html=vm),om&&Zv.fn&&(Zv.fn.dataset=om),Jv&&Zv.fn&&(Zv.fn.addClass=Jv),Qv&&Zv.fn&&(Zv.fn.removeClass=Qv),Am&&Zv.fn&&(Zv.fn.children=Am),hm&&Zv.fn&&(Zv.fn.each=hm),Dm&&Zv.fn&&(Zv.fn.find=Dm),rm&&Zv.fn&&(Zv.fn.data=rm),dm&&Zv.fn&&(Zv.fn.hide=dm),fm&&Zv.fn&&(Zv.fn.show=fm);var gT=new WeakMap,vT=new WeakMap,mT=function(){function e(){this.title=QE("tableModule.tableProperty"),this.iconSvg='<svg viewBox="0 0 20 20"><path d="M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2h1zm4 6H8v4h4V8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2.048 2.048 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14z"/></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.menu="table",this.borderStyle=[{value:"none",label:QE("tableModule.borderStyle.none")},{value:"solid",label:QE("tableModule.borderStyle.solid")},{value:"dotted",label:QE("tableModule.borderStyle.dotted")},{value:"dashed",label:QE("tableModule.borderStyle.dashed")},{value:"double",label:QE("tableModule.borderStyle.double")},{value:"groove",label:QE("tableModule.borderStyle.groove")},{value:"ridge",label:QE("tableModule.borderStyle.ridge")},{value:"inset",label:QE("tableModule.borderStyle.inset")},{value:"outset",label:QE("tableModule.borderStyle.outset")}],this.textAlignOptions=[{value:"left",label:QE("justify.left"),svg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"center",label:QE("justify.center"),svg:'<svg viewBox="0 0 1024 1024"><path d="M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"right",label:QE("justify.right"),svg:'<svg viewBox="0 0 1024 1024"><path d="M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"justify",label:QE("justify.justify"),svg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>'}]}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==Iy.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){},e.prototype.getModalContentNode=function(e){return Lg(mh.nodes(e,{match:lT(e,"table")}),1)[0]},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this.getModalContentNode(e);if(!n)return null;var r=Lg(n,2),o=r[0],i=r[1],a=Zv('<div>\n <label class="babel-container">\n <span>'.concat(QE("tableModule.modal.border"),'</span>\n <span class="babel-container-border">\n <select name="borderStyle">\n ').concat(this.borderStyle.map(function(e){return'<option value="'.concat(e.value,'">').concat(e.label,"</option>")}).join(""),'\n </select>\n <span class="color-group" data-mark="color">\n <span class="color-group-block"></span>\n <input name="borderColor" type="hidden">\n </span>\n <input name="borderWidth" type="number" placeholder="').concat(QE("tableModule.modal.borderWidth"),'">\n </span>\n </label>\n <div class="babel-container">\n <span>').concat(QE("tableModule.modal.bgColor"),'</span>\n <span class="babel-container-background">\n <span class="color-group" data-mark="bgColor">\n <span class="color-group-block"></span>\n <input name="backgroundColor" type="hidden">\n </span>\n </span>\n </div>\n <label class="babel-container">\n <span>').concat(QE("tableModule.modal.align"),'</span>\n <span class="babel-container-align">\n <select name="textAlign">\n ').concat(this.textAlignOptions.map(function(e){return'<option value="'.concat(e.value,'">').concat(e.label,"</option>")}).join(""),'\n </select>\n </span>\n </label>\n <div class="button-container">\n <button type="button">').concat(QE("tableModule.modal.ok"),"</button>\n </div>\n </div>"));a.find("[name]").each(function(e){Zv(e).val(o[Zv(e).attr("name")])});var s=function(e,t){t?Zv(".color-group-block",e).css("background-color",t).empty():Zv(".color-group-block",e).css("background-color","").html(sT)};return a.find(".color-group").each(function(n){var r=Zv('[type="hidden"]',n).val()||"";s(n,r);var o=Zv(n);o.on("click",function(){a.find(".color-group .w-e-drop-panel").hide();var i=o.data("panel");i?i.show():(i=t.getPanelContentElem(e,{mark:o.data("mark"),selectedColor:r,callback:function(e){Zv('[type="hidden"]',n).val(e||""),s(n,e),i.hide()}}),o.append(i),o.data("panel",i))})}),a.find("button").on("click",function(){var n=Array.from(a.find("[name]")).reduce(function(e,t){return e[Zv(t).attr("name")]=Zv(t).val(),e},{}),r=gT.get(e);"cell"===t.menu&&(null==r?void 0:r.length)?r.forEach(function(t){t.forEach(function(t){Wh.setNodes(e,n,{at:t[0][1]})})}):Wh.setNodes(e,n,{at:i}),setTimeout(function(){e.focus()})}),a[0]},e.prototype.getPanelContentElem=function(e,t){var n=t.mark,r=t.selectedColor,o=t.callback,i=Zv('<ul class="w-e-panel-content-color"></ul>');i.on("click","li",function(e){var t=e.target;if(t){e.preventDefault(),e.stopPropagation();var n=Zv(t).attr("data-value");o(n)}});var a=e.getMenuConfig(n).colors;(void 0===a?[]:a).forEach(function(e){var t=Zv('<div class="color-block" data-value="'.concat(e,'"></div>'));t.css("background-color",e);var n=Zv('<li data-value="'.concat(e,'"></li>'));r===e&&n.addClass("active"),n.append(t),i.append(n)});var s="";"color"===n&&(s=QE("tableModule.color.default")),"bgColor"===n&&(s=QE("tableModule.color.clear"));var u=Zv('\n <li data-value="" class="clear">\n '.concat(sT,"\n ").concat(s,"\n </li>\n "));i.prepend(u);var l=Zv('<div class="w-e-drop-panel"></div>');return l.append(i),l},e}(),yT=function(e){function t(){var t=e.apply(this,Mg([],Lg(arguments),!1))||this;return t.title=QE("tableModule.cellProperty"),t.iconSvg='<svg viewBox="0 0 20 20"><path d="m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z"/></svg>',t.tag="button",t.showModal=!0,t.modalWidth=300,t.menu="cell",t}return Fg(t,e),t.prototype.getModalContentNode=function(e){return Lg(mh.nodes(e,{match:lT(e,"td")}),1)[0]},t}(mT),bT=function(){function e(){this.title=QE("tableModule.deleteCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 510.976L393.216 445.44v-13.1072L327.68 366.7968V510.976z m327.68-78.4384l65.536-65.536V507.904L655.36 442.368v-9.8304z m393.216 484.9664V0H0v917.504h1048.576z m-65.536-131.072h-262.144v-52.4288l-13.1072 13.1072-52.4288-52.4288v91.7504H393.216v-91.7504l-52.4288 52.4288-13.1072-13.1072v52.4288H65.536V65.536H327.68v121.2416l36.0448-36.0448 29.4912 29.4912V62.2592h262.144V180.224l49.152-49.152 16.384 16.384V62.2592h262.144V786.432z m-294.912-108.1344l-160.5632-160.5632-167.1168 167.1168-78.6432-78.6432 167.1168-167.1168L288.3584 278.528l78.6432-78.6432 160.5632 160.5632 163.84-163.84 78.6432 78.6432-163.84 163.84 160.5632 160.5632-78.6432 78.6432z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Bp.isCollapsed(t)||null==Iy.getSelectedNodeByType(e,"table-cell"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")},universal:!0}),1),r=Lg(n[0],2),o=r[0],i=r[1],a=Iy.getParentNode(e,o),s=(null==a?void 0:a.children.length)||0;if(!a||s<=1)Wh.removeNodes(e,{mode:"highest"});else if(null!=Iy.getParentNode(e,a)){var u=dT(e),l=0;e:for(var c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=Lg(u[c][d],1),p=Lg(f[0],2)[1];if(Cp.equals(i,p)){l=d;break e}}mh.withoutNormalizing(e,function(){for(var t,n,r=new Set,o=new Set,i=0;i<u.length;i+=1)if(u[i]&&u[i][l]){var a=Lg(u[i][l],2),s=Lg(a[0],2)[1],c=a[1],d=c.rtl,f=c.ltr,p=c.ttb,h=c.btt,g=s.join(",");if(d>1||f>1||p>1||h>1){var v=i-(p-1),m=l-(d-1);if(v<0||v>=u.length||!u[v]||!u[v][m])continue;var y=Lg(u[v][m],1),b=Lg(y[0],2),E=b[0],w=b[1],C=w.join(",");if(!o.has(C)){o.add(C);var D=E.rowSpan,A=void 0===D?1:D,S=E.colSpan,O=void 0===S?1:S,x=Math.max(O-1,1);Wh.setNodes(e,{rowSpan:A,colSpan:x},{at:w})}}else r.add(g)}var N=Array.from(r);N.sort(function(e,t){var n=e.split(",").map(Number),r=t.split(",").map(Number);return n[n.length-2]!==r[r.length-2]?r[r.length-2]-n[n.length-2]:r[r.length-1]-n[n.length-1]});try{for(var B=_g(N),T=B.next();!T.done;T=B.next()){var k=T.value.split(",").map(Number);try{mh.hasPath(e,k)&&Wh.removeNodes(e,{at:k})}catch(e){console.warn("删除单元格失败:",k,e)}}}catch(e){t={error:e}}finally{try{T&&!T.done&&(n=B.return)&&n.call(B)}finally{if(t)throw t.error}}var F=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table")},universal:!0}),1),I=F[0];if(I){var P=Lg(I,2),R=P[0],_=P[1],L=R.columnWidths,M=Mg([],Lg(void 0===L?[]:L),!1);M.splice(l,1),Wh.setNodes(e,{columnWidths:M},{at:_})}})}}},e}(),ET=function(){function e(){this.title=QE("tableModule.deleteRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M907.6736 586.5472L747.1104 425.984l163.84-163.84-78.6432-78.6432-163.84 163.84L507.904 186.7776 429.2608 262.144l163.84 163.84-167.1168 167.1168 78.6432 78.6432 167.1168-167.1168 160.5632 160.5632 75.3664-78.6432zM0 917.504V0h1048.576v917.504H0z m983.04-327.68h-22.9376l-65.536-65.536H983.04V327.68h-91.7504l65.536-65.536h26.2144V65.536H65.536v196.608h317.8496l65.536 65.536H65.536v196.608h380.1088l-65.536 65.536H65.536v196.608H983.04v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Bp.isCollapsed(t)||null==Iy.getSelectedNodeByType(e,"table-row"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-row")},universal:!0}),1),r=Lg(n[0],2),o=r[0],i=r[1],a=Iy.getParentNode(e,o);if(((null==a?void 0:a.children.length)||0)<=1)Wh.removeNodes(e,{mode:"highest"});else{var s=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")},universal:!0}),1),u=Lg(s[0],2)[1],l=dT(e),c=0;e:for(var d=0;d<l.length;d+=1)for(var f=0;f<l[d].length;f+=1){var p=Lg(l[d][f],1),h=Lg(p[0],2)[1];if(Cp.equals(u,h)){c=d;break e}}mh.withoutNormalizing(e,function(){for(var t,n,r=[],o=0;o<l[c].length;o+=1){var a=Lg(l[c][o],2),s=Lg(a[0],1)[0].hidden,u=a[1],d=u.ttb,f=u.btt,p=u.rtl;if(d>1||f>1){var h=c-(d-1);if(h<0||h>=l.length||!l[h]||!l[h][o])continue;var g=Lg(l[h][o],1),v=Lg(g[0],2),m=v[0],y=v[1],b=m,E=b.rowSpan,w=void 0===E?1:E,C=b.colSpan,D=void 0===C?1:C;if(s)Wh.setNodes(e,{rowSpan:Math.max(w-1,1),colSpan:D},{at:y});else if(1===d&&1===p){if(c+1<l.length&&w>1){var A={type:"table-cell",rowSpan:w-1,colSpan:D,hidden:!1,children:b.children.map(function(e){return Ig({},e)})};b.isHeader&&(A.isHeader=b.isHeader),b.width&&(A.width=b.width),b.backgroundColor&&(A.backgroundColor=b.backgroundColor),b.borderWidth&&(A.borderWidth=b.borderWidth),b.borderStyle&&(A.borderStyle=b.borderStyle),b.borderColor&&(A.borderColor=b.borderColor),b.textAlign&&(A.textAlign=b.textAlign),r.push({cell:A,columnIndex:o})}else Wh.setNodes(e,{rowSpan:Math.max(w-1,1),colSpan:D},{at:y})}else Wh.setNodes(e,{rowSpan:Math.max(w-1,1),colSpan:D},{at:y})}}if(Wh.removeNodes(e,{at:i}),r.length>0){var S=i;try{r.sort(function(e,t){return e.columnIndex-t.columnIndex});try{for(var O=_g(r),x=O.next();!x.done;x=O.next()){var N=x.value,B=N.cell,T=N.columnIndex;try{var k=Mg(Mg([],Lg(S),!1),[T],!1);Wh.insertNodes(e,B,{at:k})}catch(t){try{var F=Lg(mh.node(e,S),1)[0].children.length,I=Mg(Mg([],Lg(S),!1),[F],!1);Wh.insertNodes(e,B,{at:I})}catch(e){console.warn("插入新单元格失败:",e)}}}}catch(e){t={error:e}}finally{try{x&&!x.done&&(n=O.return)&&n.call(O)}finally{if(t)throw t.error}}}catch(e){console.warn("插入新单元格失败:",e)}}})}}},e}(),wT=function(){function e(){this.title=QE("tableModule.deleteTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==Iy.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){this.isDisabled(e)||Wh.removeNodes(e,{mode:"highest"})},e}(),CT=function(){function e(){this.title=QE("tableModule.widthAuto"),this.iconSvg='<svg viewBox="0 0 1228 1024"><path d="M862.514337 563.200461H404.581995v121.753478a13.311987 13.311987 0 0 1-6.655993 11.468789 10.23999 10.23999 0 0 1-12.083188-1.433599l-204.799795-179.199821a13.721586 13.721586 0 0 1 0-20.479979l204.799795-179.302221a10.23999 10.23999 0 0 1 12.185588-1.535998 13.209587 13.209587 0 0 1 6.553593 11.673588v115.097485h457.932342V319.693504a11.571188 11.571188 0 0 1 18.841582-10.239989l204.799795 179.19982a13.721586 13.721586 0 0 1 0 20.47998l-204.799795 179.199821a10.23999 10.23999 0 0 1-12.185588 1.535998 13.311987 13.311987 0 0 1-6.655994-11.571188V563.200461zM136.499064 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785H15.155185A15.155185 15.155185 0 0 1 0 1008.844815V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086294a15.155185 15.155185 0 0 1 15.257585 15.155185zM1228.798771 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785h-106.188693a15.155185 15.155185 0 0 1-15.155185-15.052785V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086293A15.155185 15.155185 0 0 1 1228.798771 15.053809z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return!1},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Bp.isCollapsed(t)||null==Iy.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Iy.getSelectedNodeByType(e,"table");if(n){var r=n.columnWidths,o=void 0===r?[]:r,i=Iy.toDOMNode(e,n).querySelector(".table-container");if(i&&0!==o.length){var a=i.clientWidth,s=o.reduce(function(e,t){return e+t},0),u=o.map(function(e){var t=e/s;return Math.floor(t*a)}),l=e.getMenuConfig("insertTable").minWidth,c=parseInt(String(void 0===l?60:l),10)||60,d=u.map(function(e){return Math.max(c,e)}),f=d.reduce(function(e,t){return e+t},0);if(f>a){var p=a/f,h=d.map(function(e){return Math.max(c,Math.floor(e*p))});v={width:"auto",columnWidths:h};Wh.setNodes(e,v,{mode:"highest"})}else{h=Mg([],Lg(d),!1);var g=a-f-1;g>0&&h.length>0&&(h[h.length-1]+=g);v={width:"auto",columnWidths:h};Wh.setNodes(e,v,{mode:"highest"})}}else{var v={width:"auto"};Wh.setNodes(e,v,{mode:"highest"})}}}},e}();function DT(e){var t=e.children||[];return 0===t.length?[]:(t[0]||{}).children||[]}function AT(e){return DT(e).every(function(e){return!!e.isHeader})}var ST=function(){function e(){this.title=QE("tableModule.insertCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 193.3312v186.7776H140.9024v91.7504H327.68v186.7776h88.4736V471.8592h190.0544V380.1088H416.1536V193.3312zM0 917.504V0h1048.576v917.504H0zM655.36 65.536H65.536v720.896H655.36V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 262.144h-262.144v196.608h262.144V327.68z m0 262.144h-262.144v196.608h262.144v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;if(null==t)return!0;if(!Bp.isCollapsed(t))return!0;var n=Iy.getSelectedNodeByType(e,"table");if(null==n)return!0;try{var r=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")},universal:!0}),1),o=r[0];if(!o)return!0;for(var i=Lg(o,2)[1],a=dT(e),s=-1,u=0;u<a.length;u+=1){for(var l=0;l<a[u].length;l+=1){var c=Lg(a[u][l],1),d=Lg(c[0],2)[1];if(Cp.equals(i,d)){s=l;break}}if(-1!==s)break}if(-1===s)return!0;var f=n.columnWidths,p=(void 0===f?[]:f)[s];if(p&&p<20)return!0}catch(e){return!0}return!1},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")},universal:!0}),1),r=Lg(n[0],2),o=r[0],i=r[1],a=Iy.getParentNode(e,o);if(null!=a){var s=Iy.getParentNode(e,a);if(null!=s){for(var u=dT(e),l=0,c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=Lg(u[c][d],1),p=Lg(f[0],2)[1];if(Cp.equals(i,p)){l=d;break}}mh.withoutNormalizing(e,function(){for(var t=new Set,n=new Set,r=0;r<u.length;r+=1)if(u[r]&&u[r][l]){var o=Lg(u[r][l],2);Lg(o[0],1);var i=o[1],a=i.rtl,c=i.ltr,d=i.ttb,f=i.btt;if(a>1||c>1||d>1||f>1){var p=r-(d-1),h=l-(a-1);if(p<0||p>=u.length||!u[p]||!u[p][h])continue;var g=Lg(u[p][h],1),v=Lg(g[0],2),m=v[0],y=v[1],b=y.join(",");if(t.has(b))n.add(r);else{t.add(b);var E=m.rowSpan,w=void 0===E?1:E,C=m.colSpan,D=(void 0===C?1:C)+1;m.hidden||Wh.setNodes(e,{colSpan:D},{at:y});for(var A=0;A<w;A+=1)n.add(p+A)}}}for(r=0;r<u.length;r+=1)if(!n.has(r)&&u[r]&&u[r][l]){var S={type:"table-cell",children:[{text:""}]};0===r&&AT(s)&&(S.isHeader=!0);var O=Lg(u[r][l],1),x=Lg(O[0],2)[1];Wh.insertNodes(e,S,{at:x})}var N=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table")},universal:!0}),1),B=N[0];if(B){var T=Lg(B,2),k=T[0],F=T[1],I=k.columnWidths,P=void 0===I?[]:I,R=Mg([],Lg(P),!1),_=e.getMenuConfig("insertTable").minWidth,L=void 0===_?60:_,M=P[l]||parseInt(L,10)||60,j=Math.floor(M/2),H=M-j;R.splice(l,0,j),R[l+1]=H,Wh.setNodes(e,{columnWidths:R},{at:F})}})}}}},e}(),OT=function(){function e(){this.title=QE("tableModule.insertRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M707.7888 521.0112h-147.456v-147.456H488.2432v147.456h-147.456v68.8128h147.456v147.456h72.0896v-147.456h147.456zM0 917.504V0h1048.576v917.504H0zM327.68 65.536H65.536v196.608H327.68V65.536z m327.68 0H393.216v196.608h262.144V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 258.8672H65.536v462.0288H983.04V324.4032z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Bp.isCollapsed(t)||null==Iy.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){var n;if(!this.isDisabled(e)){var r=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")},universal:!0}),1),o=Lg(r[0],2)[1],i=dT(e),a=0;e:for(var s=0;s<i.length;s+=1)for(var u=0;u<i[s].length;u+=1){var l=Lg(i[s][u],1),c=Lg(l[0],2)[1];if(Cp.equals(o,c)){a=s;break e}}var d=(null===(n=i[a])||void 0===n?void 0:n.length)||0;0!==d&&mh.withoutNormalizing(e,function(){for(var t=a+1,n=t>=0&&t<i.length,r=[],s=0;n&&s<i[a].length;s+=1){var u=Lg(i[a][s],2)[1],l=u.ttb,c=u.btt;if(l>1||c>1){var f=a-(l-1);if(f<0||f>=i.length||!i[f]||!i[f][s])continue;var p=Lg(i[f][s],1),h=Lg(p[0],2),g=h[0],v=h[1],m=g.rowSpan||1;r.push(s),g.hidden||Wh.setNodes(e,{rowSpan:m+1},{at:v})}}for(var y=(e.getMenuConfig("insertTable")||{}).minRowHeight,b={type:"table-row",children:[],height:parseInt((void 0===y?30:y).toString(),10)||30},E=0;E<d;E+=1)if(!r.includes(E)){b.children.push({type:"table-cell",children:[{text:""}]})}var w=Cp.parent(o),C=Cp.next(w);Wh.insertNodes(e,b,{at:C})})}},e}();var xT=function(){function e(){this.title=QE("tableModule.insertTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64v896h1024V64H0z m384 576v-192h256v192h-256z m256 64v192h-256v-192h256z m0-512v192h-256V192h256zM320 192v192H64V192h256z m-256 256h256v192H64v-192z m640 0h256v192h-256v-192z m0-64V192h256v192h-256zM64 704h256v192H64v-192z m640 192v-192h256v192h-256z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Bp.isCollapsed(t)||!!Iy.getSelectedElems(e).some(function(t){var n=Iy.getNodeType(t);return"pre"===n||("table"===n||("list-item"===n||!!e.isVoid(t)))}))},e.prototype.getPanelContentElem=function(e){var t=this;if(this.$content)return this.$content[0];for(var n=Zv('<div class="w-e-panel-content-table"></div>'),r=Zv("<span>0 × 0</span>"),o=Zv("<table></table>"),i=0;i<10;i+=1){for(var a=Zv("<tr></tr>"),s=0;s<10;s+=1){var u=Zv("<td></td>");u.attr("data-x",s.toString()),u.attr("data-y",i.toString()),a.append(u),u.on("mouseenter",function(e){var t=e.target;if(null!=t){var n=Zv(t).dataset(),i=n.x,a=n.y;r[0].innerHTML="".concat(i+1," × ").concat(a+1),o.children().each(function(e){Zv(e).children().each(function(e){var t=Zv(e),n=t.dataset(),r=n.x,o=n.y;r<=i&&o<=a?t.addClass("active"):t.removeClass("active")})})}}),u.on("click",function(n){n.preventDefault();var r=n.target;if(null!=r){var o=Zv(r).dataset(),i=o.x,a=o.y;t.insertTable(e,a+1,i+1)}})}o.append(a)}return n.append(o),n.append(r),this.$content=n,n[0]},e.prototype.insertTable=function(e,t,n){var r=parseInt(t,10),o=parseInt(n,10);if(r&&o&&!(r<=0||o<=0)){if(Iy.isSelectedEmptyParagraph(e)&&Wh.removeNodes(e,{mode:"highest"}),0===e.children.length){Wh.insertNodes(e,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}var i=function(e,t,n){for(var r,o=[],i=e.getMenuConfig("insertTable"),a=i.minWidth,s=void 0===a?60:a,u=i.minRowHeight,l=void 0===u?30:u,c=i.tableFullWidth,d=i.tableHeader,f=Array(n).fill(parseInt(s,10)||60),p=0;p<t;p+=1){for(var h=[],g=0;g<n;g+=1){var v={type:"table-cell",children:[{text:""}]};0===p&&(v.isHeader=null===(r=null==d?void 0:d.selected)||void 0===r||r),h.push(v)}o.push({type:"table-row",children:h,height:parseInt(l,10)||30})}return{type:"table",width:(null==c?void 0:c.selected)?"100%":"auto",children:o,columnWidths:f}}(e,r,o);Wh.insertNodes(e,i,{mode:"highest"})}},e}(),NT={isInTable:function(e,t){return void 0===t&&(t={}),!!Lg(mh.nodes(e,{match:lT(e,"table"),at:t.at}),1)[0]},selection:function(e){var t,n,r,o,i,a,s,u;return Rg(this,function(l){switch(l.label){case 0:t=gT.get(e),n=0,l.label=1;case 1:if(!(t&&n<t.length))return[3,4];for(r=[],o=0;o<t[n].length;o+=1)i=Lg(t[n][o],2),a=i[0],s=i[1],u=s.ltr,1===s.ttb&&r.push(a),o+=u-1;return[4,r];case 2:l.sent(),l.label=3;case 3:return n+=1,[3,1];case 4:return[2]}})},unselect:function(e){vT.delete(e),gT.delete(e)},isSelected:function(e,t){var n=vT.get(e);return!!n&&n.has(t)},hasSelected:function(e){return gT.has(e)}},BT=function(){function e(){this.title=QE("tableModule.mergeCell"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M482.2 508.4 331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4c2.4-1.8 2.4-5.4 0-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4c-2.3 1.8-2.3 5.3 0 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return!this.canMerge(e)},e.prototype.exec=function(e,t){this.isDisabled(e)||(this.merge(e),NT.unselect(e))},e.prototype.canMerge=function(e){var t=gT.get(e);if(!t||!t.length)return!1;var n=Lg(t[t.length-1][t[t.length-1].length-1],1),r=Lg(n[0],2)[1],o=Lg(t[0][0],1);return!!cT(e,[Lg(o[0],2)[1],r],"table")},e.prototype.merge=function(e){if(this.canMerge(e)){var t=gT.get(e);if(t&&t.length){var n=Lg(t[0][0],1),r=Lg(n[0],2)[1],o=Lg(_p.children(e,r,{reverse:!0}),1),i=Lg(o[0],2)[1];mh.withoutNormalizing(e,function(){for(var n,o,a,s,u,l,c=new Map,d=[],f=1/0,p=-1/0,h=1/0,g=-1/0,v=0;v<t.length;v+=1)for(var m=0;m<t[v].length;m+=1){var y=Lg(t[v][m],2),b=Lg(y[0],2),E=b[0],w=b[1],C=y[1].ttb,D=w.join(",");if(1===C&&!c.has(D)){c.set(D,{path:w,x:v,y:m,element:E});var A=E.rowSpan,S=void 0===A?1:A,O=E.colSpan,x=v,N=v+S-1,B=m,T=m+(void 0===O?1:O)-1;f=Math.min(f,x),p=Math.max(p,N),h=Math.min(h,B),g=Math.max(g,T)}}var k=p-f+1,F=g-h+1;try{for(var I=_g(c),P=I.next();!P.done;P=I.next()){w=Lg(P.value,2)[1].path;Cp.equals(r,w)||d.push(w)}}catch(e){n={error:e}}finally{try{P&&!P.done&&(o=I.return)&&o.call(I)}finally{if(n)throw n.error}}d.sort(function(e,t){for(var n=0;n<Math.min(e.length,t.length);n+=1)if(e[n]!==t[n])return t[n]-e[n];return t.length-e.length});try{for(var R=_g(d),_=R.next();!_.done;_=R.next()){w=_.value;try{if(!mh.hasPath(e,w))continue;try{for(var L=(u=void 0,_g(_p.children(e,w,{reverse:!0}))),M=L.next();!M.done;M=L.next()){var j=Lg(M.value,2)[1];Wh.moveNodes(e,{to:Cp.next(i),at:j})}}catch(e){u={error:e}}finally{try{M&&!M.done&&(l=L.return)&&l.call(L)}finally{if(u)throw u.error}}Wh.removeNodes(e,{at:w})}catch(e){}}}catch(e){a={error:e}}finally{try{_&&!_.done&&(s=R.return)&&s.call(R)}finally{if(a)throw a.error}}Wh.setNodes(e,{rowSpan:k,colSpan:F},{at:r})})}}},e}(),TT=function(){function e(){this.title=QE("tableModule.splitCell"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M362.667 494.933v53.334l25.6-25.6zm0-241.066L460.8 352V78.933H57.6v98.134h305.067zm0 535.466v57.6H57.6v98.134h403.2V691.2zM661.333 494.933v53.334l-25.6-25.6zm0-241.066L563.2 352V78.933h403.2v98.134H661.333zm0 535.466v57.6H966.4v98.134H563.2V691.2z"/><path d="M753.067 341.333 693.333 281.6 512 460.8 330.667 281.6l-59.734 59.733 181.334 181.334L270.933 704l59.734 59.733L512 582.4l181.333 181.333L753.067 704 571.733 522.667z"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")}}),1),n=t[0];if(!n)return!0;var r=Lg(n,1)[0],o=r.rowSpan,i=void 0===o?1:o,a=r.colSpan;return!(i>1||(void 0===a?1:a)>1)},e.prototype.exec=function(e,t){this.isDisabled(e)||this.split(e)},e.prototype.split=function(e,t){void 0===t&&(t={});var n=Lg(mh.nodes(e,{match:lT(e,"table","th","td"),at:t.at}),2),r=n[0],o=n[1];if(r&&o){var i=AT(Lg(r,1)[0]),a=Lg(o,2),s=a[0],u=a[1],l=s.rowSpan,c=void 0===l?1:l,d=s.colSpan,f=void 0===d?1:d;1===c&&1===f||mh.withoutNormalizing(e,function(){Wh.setNodes(e,{rowSpan:1,colSpan:1},{at:u});for(var t=1;t<f;t+=1){var n={type:"table-cell",children:[{text:""}]};0===u[u.length-2]&&i&&(n.isHeader=!0);var r=u.slice(0,-1),o=u[u.length-1]+t,a=Mg(Mg([],Lg(r),!1),[o],!1);try{Wh.insertNodes(e,n,{at:a})}catch(t){try{var s=Lg(mh.node(e,r),1)[0].children.length,l=Mg(Mg([],Lg(r),!1),[s],!1);Wh.insertNodes(e,n,{at:l})}catch(e){console.warn("插入同行单元格失败: ".concat(e instanceof Error?e.message:String(e)))}}}for(var d=1;d<c;d+=1){var p=u[u.length-2]+d,h=Mg(Mg([],Lg(u.slice(0,-2)),!1),[p],!1);try{var g=Lg(mh.node(e,h),1)[0];if(!g){console.warn("目标行 ".concat(p," 不存在"));continue}for(t=0;t<f;t+=1){n={type:"table-cell",children:[{text:""}]},o=u[u.length-1]+t,a=Mg(Mg([],Lg(h),!1),[o],!1);try{var v=g.children.length;if(o>=v){var m=Mg(Mg([],Lg(h),!1),[v],!1);Wh.insertNodes(e,n,{at:m})}else Wh.insertNodes(e,n,{at:a})}catch(t){try{var y=g.children.length;l=Mg(Mg([],Lg(h),!1),[y],!1);Wh.insertNodes(e,n,{at:l})}catch(e){console.warn("插入单元格到第".concat(d,"行失败: ").concat(e instanceof Error?e.message:String(e)))}}}}catch(e){console.warn("处理第".concat(d,"行时出错: ").concat(e instanceof Error?e.message:String(e)))}}})}},e}(),kT=function(){function e(){this.title=QE("tableModule.header"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 128l-64 0L384 128 320 128 0 128l0 256 0 64 0 192 0 64 0 256 320 0 64 0 256 0 64 0 320 0 0-256 0-64L1024 448 1024 384 1024 128 704 128zM640 640 384 640 384 448l256 0L640 640zM64 448l256 0 0 192L64 640 64 448zM320 896 64 896l0-192 256 0L320 896zM640 896 384 896l0-192 256 0L640 896zM960 896l-256 0 0-192 256 0L960 896zM960 640l-256 0L704 448l256 0L960 640z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){var t=Iy.getSelectedNodeByType(e,"table");return null!=t&&AT(t)},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Bp.isCollapsed(t)||null==Iy.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=!t,r=Iy.getSelectedNodeByType(e,"table");if(null!=r)DT(r).forEach(function(t){return Wh.setNodes(e,{isHeader:n},{at:Iy.findPath(e,t)})})}},e}(),FT={key:"insertTable",factory:function(){return new xT}},IT={key:"deleteTable",factory:function(){return new wT}},PT={key:"insertTableRow",factory:function(){return new OT}},RT={key:"deleteTableRow",factory:function(){return new ET}},_T={key:"insertTableCol",factory:function(){return new ST}},LT={key:"deleteTableCol",factory:function(){return new bT}},MT={key:"tableHeader",factory:function(){return new kT}},jT={key:"tableFullWidth",factory:function(){return new CT}},HT={key:"mergeTableCell",factory:function(){return new BT}},zT={key:"splitTableCell",factory:function(){return new TT}},$T={key:"setTableProperty",factory:function(){return new mT}},UT={key:"setTableCellProperty",factory:function(){return new yT}};var VT={selector:"td:not([data-w-e-type]),th:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Zv(e);0===(t=t.filter(function(e){return"paragraph"===Iy.getNodeType(e)||(!!Nh.isText(e)||!!n.isInline(e))})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=parseInt(r.attr("colSpan")||"1",10),i=parseInt(r.attr("rowSpan")||"1",10),a="none"===hT(r,"display"),s=r.attr("width")||"auto";return{type:"table-cell",isHeader:"th"===pT(r),colSpan:o,rowSpan:i,width:s,children:t,hidden:a}}};var WT={selector:"tr:not([data-w-e-type])",parseElemHtml:function(e,t,n){for(var r=Zv(e),o=[],i=0;i<t.length;i+=1){var a=t[i];if("table-cell"===Iy.getNodeType(a)){var s=a;if(s.hidden)continue;o.push(s)}}return{type:"table-row",height:parseInt(hT(r,"height")||"0",10)||void 0,children:o}}};var GT,qT={selector:"table:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r,o,i=Zv(e),a="auto";"100%"===hT(i,"width")&&(a="100%"),"100%"===i.attr("width")&&(a="100%");var s={type:"table",width:a,height:parseInt(hT(i,"height")||"0",10),children:t.filter(function(e){return"table-row"===Iy.getNodeType(e)})},u=(null===(r=i.find("tr")[0])||void 0===r?void 0:r.children)||[],l=(null===(o=i.find("colgroup")[0])||void 0===o?void 0:o.children)||null,c=l?Array.from(l).map(function(e){return parseInt(e.getAttribute("width"),10)}).filter(function(e){return!Number.isNaN(e)}):[];if(c.length>0)s.columnWidths=c;else if(u.length>0){var d=[];Array.from(u).forEach(function(e){var t=parseInt(Zv(e).attr("colSpan")||"1",10),n=parseInt(hT(Zv(e),"width")||"90",10);d.push(n);for(var r=1;r<t;r+=1)d.push(90)}),s.columnWidths=d}return s}},KT=null===(GT=null===window||void 0===window?void 0:window.getComputedStyle(document.documentElement))||void 0===GT?void 0:GT.getPropertyValue("--w-e-textarea-border-color");function YT(e){var t=e.selection;if(null==t)return!1;var n=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")}}),1),r=n[0];if(r){var o=Lg(r,2)[1],i=mh.start(e,o);if(wh.equals(t.anchor,i))return!0}return!1}function XT(e,t){var n=t.offset;if(0===n)return!1;var r=mh.node(e,t);if(!Nh.isText(r[0]))return!1;var o=_p.string(r[0]);return!(n>=o.length)&&("\n"===o[n-1]&&"\r"===o[n])}function ZT(e,t,n){var r=e.selection;if(null==r||"line"===t)return!1;var o=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")}}),1),i=o[0],a=r.anchor;if("backward"===n&&0===r.anchor.offset&&(a=mh.before(e,r)),"forward"===n&&mh.isEnd(e,r.anchor,r.anchor.path)&&(a=mh.after(e,r)),null==a)return!1;var s=mh.above(e,{at:a,match:function(e){return Iy.checkNodeType(e,"table-cell")}});if(null==s||null==i||!Cp.equals(s[1],i[1]))return!1;var u=mh.node(e,a);if(!Nh.isText(u[0])||u[0].text.length<2)return!1;var l="backward"===n?[a.offset-2,a.offset]:[a.offset,a.offset+2],c=_p.string(u[0]);return"\n\r"===c.slice.apply(c,Mg([],Lg(l),!1))?(Wh.insertText(e,c.slice(0,l[0])+c.slice(l[1]),{at:{anchor:mh.start(e,a.path),focus:mh.end(e,a.path)}}),!0):!!XT(e,a)&&(Wh.insertText(e,c.slice(0,r.anchor.offset-1)+c.slice(r.anchor.offset+1),{at:{anchor:mh.start(e,a.path),focus:mh.end(e,a.path)}}),!0)}function JT(e,t){var n=mh.nodes(e,{at:t,match:function(e){return"table"===Iy.getNodeType(e)}});return!!Mg([],Lg(n),!1).find(function(){return!0})}function QT(e){var t,n;try{for(var r=_g(["paragraph","header1","header2","header3","header4","header5","header6","blockquote","list-item","todo","divider"]),o=r.next();!o.done;o=r.next()){var i=o.value;if(Iy.getSelectedNodeByType(e,i))return!0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return!1}function ek(e){var t=document.createElement("div");t.innerHTML=e;var n=[],r=!1;return Array.from(t.childNodes).forEach(function(e){if(e.nodeType!==Node.TEXT_NODE){if(!(e instanceof HTMLElement)||"p"!==e.tagName.toLowerCase())return n.push(e.cloneNode(!0)),void(r=!0);var t=e.innerHTML,o=t.trim();if(o&&" "!==o){r&&n.push(document.createElement("br"));var i=document.createElement("div");i.innerHTML=t,Array.from(i.childNodes).forEach(function(e){n.push(e.cloneNode(!0))}),r=!0}}else(e.textContent||"").trim()&&(n.push(e.cloneNode(!0)),r=!0)}),t.replaceChildren.apply(t,Mg([],Lg(n),!1)),t.innerHTML}var tk={selector:"table",preParseHtml:function(e){var t=Zv(e);if("table"!==pT(t))return e;var n=t.find("tbody");if(0===n.length)return e;var r=t.find("tr");t.append(r),n.remove();for(var o=t.find("td, th"),i=0;i<o.length;i+=1){var a=(u=Zv(o[i])).attr("style");if(a){/display\s*:\s*none/i.test(a)&&u.remove()}u.attr("width","auto")}var s=t.find("td, th");for(i=0;i<s.length;i+=1){var u,l=(u=Zv(s[i])).html()||"";l=ek(l=(l=l.replace(/<o:p[^>]*>[\s\S]*?<\/o:p>/gi,"")).replace(/<\/o:p>/gi,"")),u.html(l)}return t[0]}};function nk(e){var t,n,r=[],o=0;try{for(var i=_g(e),a=i.next();!a.done;a=i.next()){o+=a.value,r.push(o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function rk(e){var t,n,r=[],o=e.reduce(function(e,t){return e+t},0);try{for(var i=_g(e),a=i.next();!a.done;a=i.next()){var s=a.value;r.push(s/o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var ok=null;var ik=!1,ak=!1,sk=0,uk=null,lk=Zv(window);lk.on("mousedown",function(e){var t=e.target;if(t.closest('[data-block-type="table-cell"]'))ik=!0;else if("DIV"===t.tagName&&t.closest(".column-resizer-item")){if(null===uk)return;ak=!0;var n=e.clientX;sk=n,document.body.style.cursor="col-resize",e.preventDefault()}lk.on("mousemove",ck),lk.on("mouseup",dk)});var ck=Sw(function(e){if(ak&&null!==uk){e.preventDefault();var t,n=e.clientX,r=n-sk,o=Lg(mh.nodes(uk,{match:lT(uk,"table")}),1),i=Lg(o[0],1)[0],a=i.columnWidths,s=void 0===a?[]:a,u=i.resizingIndex,l=void 0===u?-1:u,c=Iy.getSelectedNodeByType(uk,"table"),d=Iy.toDOMNode(uk,c).querySelector(".table");if(d)t=function(e,t,n,r,o){var i=Mg([],Lg(e),!1);if(t<0||t>=e.length)return i;var a=o.getMenuConfig("insertTable").minWidth,s=parseInt((void 0===a?60:a).toString(),10)||60,u=n-(0===t?0:r[t-1]),l=Math.max(s,u);return i[t]=Math.floor(100*l)/100,i}(s,l,n-d.getBoundingClientRect().left,nk(s),uk);else t=function(e,t,n,r){var o=Mg([],Lg(e),!1),i=r.getMenuConfig("insertTable").minWidth,a=parseInt((void 0===i?60:i).toString(),10)||60,s=o[t],u=Math.max(a,s+n);return o[t]=Math.floor(100*u)/100,o}(s,l,r,uk);Wh.setNodes(uk,{columnWidths:t},{mode:"highest"})}},100);function dk(e){ik=!1,ak=!1,uk=null,document.body.style.cursor="",lk.off("mousemove",ck),lk.off("mouseup",dk)}function fk(e,t){"mouseenter"===t.type?Wh.setNodes(e,{isResizing:!0},{mode:"highest"}):Wh.setNodes(e,{isResizing:!1},{mode:"highest"})}function pk(e){var t,n,r=[],o=0;try{for(var i=_g(e),a=i.next();!a.done;a=i.next()){o+=a.value,r.push(o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var hk=!1,gk=0,vk=null,mk=Zv(window);var yk=Sw(function(e){if(hk&&null!==vk){e.preventDefault();var t,n=e.clientY,r=n-gk,o=Lg(mh.nodes(vk,{match:lT(vk,"table")}),1),i=Lg(o[0],1)[0],a=i.children,s=i.resizingRowIndex,u=void 0===s?-1:s,l=a.map(function(e){return e.height||30}),c=Iy.getSelectedNodeByType(vk,"table"),d=Iy.toDOMNode(vk,c).querySelector(".table");if(d)t=function(e,t,n,r,o){var i=Mg([],Lg(e),!1);if(t<0||t>=e.length)return i;var a=(o.getMenuConfig("insertTable")||{}).minRowHeight,s=parseInt((void 0===a?30:a).toString(),10)||30,u=n-(0===t?0:r[t-1]),l=Math.max(s,u);return i[t]=Math.floor(100*l)/100,i}(l,u,n-d.getBoundingClientRect().top,pk(l),vk);else t=function(e,t,n,r){var o=Mg([],Lg(e),!1),i=(r.getMenuConfig("insertTable")||{}).minRowHeight,a=parseInt((void 0===i?30:i).toString(),10)||30,s=o[t],u=Math.max(a,s+n);return o[t]=Math.floor(100*u)/100,o}(l,u,r,vk);var f=Iy.getSelectedNodeByType(vk,"table");if(f&&u>=0&&u<t.length){var p=Mg(Mg([],Lg(Iy.findPath(vk,f)),!1),[u],!1);try{Wh.setNodes(vk,{height:t[u]},{at:p})}catch(e){console.warn("更新行高度失败:",e)}}}},100);function bk(e){hk=!1,vk=null,document.body.style.cursor="",mk.off("mousemove",yk),mk.off("mouseup",bk)}function Ek(e,t){"mouseenter"===t.type?Wh.setNodes(e,{isResizingRow:!0},{mode:"highest"}):Wh.setNodes(e,{isResizingRow:!1},{mode:"highest"})}mk.on("mousedown",function(e){var t=e.target;if("DIV"===t.tagName&&t.closest(".row-resizer-item")){if(null===vk)return;hk=!0;var n=e.clientY;gk=n,document.body.style.cursor="row-resize",e.preventDefault()}mk.on("mousemove",yk),mk.on("mouseup",bk)});var wk={type:"table",renderElem:function(e,t,n){var r=function(e,t){if(e.isDisabled())return!1;var n=e.selection;if(null==n)return!0;if(Bp.isCollapsed(n))return!0;var r=n.anchor,o=n.focus,i=Iy.findPath(e,t),a=mh.start(e,i),s=mh.end(e,i),u=wh.compare(r,s)<=0&&wh.compare(r,a)>=0,l=wh.compare(o,s)<=0&&wh.compare(o,a)>=0;return!!(u&&l&&Cp.equals(r.path.slice(0,3),o.path.slice(0,3)))}(n,e),o=e,i=o.width,a=void 0===i?"auto":i,s=o.height,u=o.columnWidths,l=void 0===u?[]:u,c=o.scrollWidth,d=void 0===c?0:c,f=o.isHoverCellBorder,p=o.resizingIndex,h=o.isResizing,g=o.isHoverRowBorder,v=o.resizingRowIndex,m=o.isResizingRow,y=Iy.isNodeSelected(n,e),b=Lg(NT.selection(n),1)[0],E=rk(l),w=BC("div",{className:"table-container","data-selected":y,on:{mousedown:function(t){if("DIV"===t.target.tagName&&t.preventDefault(),!n.isDisabled()){t.target.closest('[data-block-type="table-cell"]')&&NT.unselect(n);var r=Iy.findPath(n,e),o=mh.start(n,r),i=n.selection;if(null!=i)i.anchor.path[0]!==r[0]&&"DIV"===t.target.tagName&&n.select(o);else n.select(o)}}}},BC("table",{width:a,contentEditable:r,className:"table ".concat(b?"table-selection-none":""),style:{width:"100%"===a?a:"".concat(l.reduce(function(e,t){return e+t},0),"px")},on:{mousemove:rE(function(t){NT.hasSelected(n)||(function(e,t,n,r){if(!e.isDisabled()&&!ik&&!ak){var o=t,i=o.width,a=void 0===i?"auto":i,s=o.columnWidths,u=void 0===s?[]:s,l=o.isHoverCellBorder,c=o.resizingIndex,d=n.clientX,f=n.target;if(jm(f)&&d>(g=f.getBoundingClientRect()).x+5&&d<g.x+g.width-5)return void(l&&Wh.setNodes(e,{isHoverCellBorder:!1,resizingIndex:-1},{mode:"highest"}));if(jm(f)){var p=f.closest(".table");if(p)for(var h=n.clientX,g=p.getBoundingClientRect(),v="100%"===a?rk(u).map(function(e){return e*r}):u,m=nk(v),y=0;y<m.length;y+=1)if(h-g.x>=m[y]-5&&h-g.x<m[y]+5){if(c===y)return;return void Wh.setNodes(e,{isHoverCellBorder:!0,resizingIndex:y},{mode:"highest"})}}!0===l&&Wh.setNodes(e,{isHoverCellBorder:!1,resizingIndex:-1},{mode:"highest"})}}(n,e,t,d),function(e,t,n){if(!e.isDisabled()&&!hk){var r=t,o=r.children,i=r.isHoverRowBorder,a=r.resizingRowIndex,s=n.target;if(jm(s)){var u=s.closest(".table");if(u)for(var l=n.clientY,c=u.getBoundingClientRect(),d=pk(o.map(function(e){return e.height||30})),f=0;f<d.length;f+=1)if(l-c.y>=d[f]-5&&l-c.y<d[f]+5){if(a===f)return;return void Wh.setNodes(e,{isHoverRowBorder:!0,resizingRowIndex:f},{mode:"highest"})}}!0===i&&Wh.setNodes(e,{isHoverRowBorder:!1,resizingRowIndex:-1},{mode:"highest"})}}(n,e,t))},25)}},BC("colgroup",{contentEditable:!1},l.map(function(e){return BC("col",{width:e})})),BC("tbody",null,t)),BC("div",{className:"column-resizer",contentEditable:!1},l.map(function(e,t){var r=e;return"100%"===a&&(r=E[t]*d),BC("div",{className:"column-resizer-item",style:{minWidth:"".concat(r,"px")}},BC("div",{className:"resizer-line-hotzone ".concat(f&&t===p?"visible ":"").concat(h&&t===p?"highlight":""),style:{height:"".concat(s,"px")},on:{mouseenter:function(e){return fk(n,e)},mouseleave:function(e){return fk(n,e)},mousedown:function(e){return function(e){ak||(uk=e)}(n)}}},BC("div",{className:"resizer-line"})))})),BC("div",{className:"row-resizer",contentEditable:!1},e.children.map(function(e,t){var r=l.reduce(function(e,t){return e+t},0),o=e.height||30;return BC("div",{className:"row-resizer-item",style:{minHeight:"".concat(o,"px")}},BC("div",{className:"resizer-line-hotzone-horizontal ".concat(g&&t===v?"visible ":"").concat(m&&t===v?"highlight":""),style:{width:"".concat(r,"px")},on:{mouseenter:function(e){return Ek(n,e)},mouseleave:function(e){return Ek(n,e)},mousedown:function(e){return function(e){hk||(vk=e)}(n)}}},BC("div",{className:"resizer-line-horizontal"})))}))),C=lC("div",{hook:{insert:function(e){var t=e.elm;return function(e,t){if(jm(t)){var n=t.querySelector("table");n&&(ok=new ResizeObserver(function(t){var n=Lg(t,1)[0].contentRect;Wh.setNodes(e,{scrollWidth:n.width,height:n.height},{mode:"highest"})}),ok.observe(n))}}(n,t)},destroy:function(){ok&&(null==ok||ok.disconnect(),ok=null)}}},w);return C}},Ck={type:"table-row",renderElem:function(e,t,n){var r=e.height;return BC("tr",{style:r?{height:"".concat(r,"px")}:{}},t)}},Dk={type:"table-cell",renderElem:function(e,t,n){var r=function(e,t){var n=Iy.getParentNode(e,t);if(null==n)return!1;var r=Iy.getParentNode(e,n);return null!=r&&DT(r).some(function(e){return e===t})}(n,e),o=e,i=o.colSpan,a=void 0===i?1:i,s=o.rowSpan,u=void 0===s?1:s,l=o.isHeader,c=void 0!==l&&l,d=o.hidden,f=void 0!==d&&d,p=NT.isSelected(n,e);return BC(r&&c?"th":"td",{colSpan:a,rowSpan:u,"data-block-type":"table-cell",className:p?"w-e-selected":"",style:{display:f?"none":""}},t)}};function Ak(e,t){null==e.data&&(e.data={});var n=e.data;null==n.style&&(n.style={}),Object.assign(n.style,t)}var Sk={renderStyle:function(e,t){var n,r;if(!kp.isElement(e))return t;var o=e,i=o.backgroundColor,a=o.borderWidth,s=o.borderStyle,u=o.borderColor,l=o.textAlign,c={};if(i&&(c.backgroundColor=i),a){/^\d+(\.\d+)?$/.test(a)?c.borderWidth="".concat(a,"px"):c.borderWidth=a}s&&(c.borderStyle="none"===s?"":s),u&&(c.borderColor=u),l&&(c.textAlign=l);var d=t;return"table"===e.type?Ak(null===(r=(null===(n=d.children)||void 0===n?void 0:n[0]).children)||void 0===r?void 0:r[0],c):Ak(d,c),d},styleToHtml:function(e,t){if("table"!==e.type&&"table-cell"!==e.type)return t;var n=e.backgroundColor,r=e.borderWidth,o=e.borderStyle,i=e.borderColor,a=e.textAlign;if(!(n||r||o||i||a))return t;var s=Zv(t);return n&&s.css("background-color",n),r&&s.css("border-width","".concat(r,"px")),o&&s.css("border-style","none"===o?"":o),i&&s.css("border-color",i),a&&s.css("text-align",a),function(e){return 0===e.length?"":e[0].outerHTML}(s)},parseStyleHtml:function(e,t,n){if(!["TABLE","TD","TH"].includes(e.tagName))return t;var r=Zv(e),o=t,i=hT(r,"background-color");i||(i=hT(r,"background")),i&&(o.backgroundColor=i);var a=hT(r,"border");a||"TD"!==e.tagName||(a="1px solid ".concat(KT));var s,u=Lg((null==a?void 0:a.split(" "))||[],3),l=u[0],c=u[1],d=u[2];(l=hT(r,"border-width")||l)&&(o.borderWidth=(s=l.trim())&&"string"==typeof s&&s.includes("pt")?s.replace(/(\d+(\.\d+)?)\s*pt/g,function(e,t){var n=(4*parseFloat(t)/3).toFixed(2);return"".concat(n,"px")}):s),(c=hT(r,"border-style")||c)&&(o.borderStyle="none"===c?"":c),(d=hT(r,"border-color")||d)&&(o.borderColor=d);var f=hT(r,"text-align");return(f=hT(r,"text-align")||f)&&(o.textAlign=f),t},renderElems:[wk,Ck,Dk],elemsToHtml:[oT,iT,aT],preParseHtml:[tk],parseElemsHtml:[VT,WT,qT],menus:[FT,IT,PT,RT,_T,LT,MT,jT,HT,zT,$T,UT],editorPlugin:function(e){var t=e.insertBreak,n=e.deleteBackward,r=e.deleteForward,o=e.deleteFragment,i=e.normalizeNode,a=e.insertData,s=e.handleTab,u=e.selectAll,l=e;l.insertBreak=function(){null==Iy.getSelectedNodeByType(l,"table")?t():l.insertText("\n\r")},l.deleteBackward=function(e){if(!YT(l)&&!ZT(l,e,"backward")){var t=l.selection;if(t){var r=mh.before(l,t),o=mh.above(l,{at:t,match:function(e){return Iy.checkNodeType(e,"table-cell")}});if(r){var i=JT(l,r);if(!o&&i&&QT(l))return}}n(e)}},l.handleTab=function(){var t;if(Iy.getSelectedNodeByType(l,"table")){var n=mh.above(e);Iy.checkNodeType(n[0],"table-cell")&&Wh.select(e,n[1]);var r=mh.next(e);if(r)r[0]&&r[0].text&&(r=null!==(t=mh.above(e,{at:r[1]}))&&void 0!==t?t:r),Wh.select(e,r[1]);else{var o=l.children||[],i=o.length;if(Iy.checkNodeType(o[i-1],"table")){var a=Iy.genEmptyParagraph();Wh.insertNodes(l,a,{at:[i]}),l.handleTab()}}}else s()},l.deleteForward=function(e){if(!YT(l)&&!ZT(l,e,"forward")){var t=l.selection;if(t){var n=mh.after(l,t),o=mh.above(l,{at:t,match:function(e){return Iy.checkNodeType(e,"table-cell")}});if(n){var i=JT(l,n);if(!o&&i&&QT(l))return}}r(e)}},l.deleteFragment=function(e){var t=l.selection;if(t){var n,r=!1,i={anchor:t.anchor,focus:t.focus},a=wh.isBefore(i.anchor,i.focus);if(XT(l,t.anchor))(n=mh[a?"before":"after"](l,t.anchor))&&(i.anchor=n),r=!0;if(XT(l,t.focus))(n=mh[a?"after":"before"](l,t.focus))&&(i.focus=n),r=!0;r&&Wh.setSelection(l,i),o(e)}},l.normalizeNode=function(e){var t=Lg(e,2),n=t[0],r=t[1];if("table"!==Iy.getNodeType(n))return i([n,r]);if(Iy.isLastNode(l,n)){var o=Iy.genEmptyParagraph();Wh.insertNodes(l,o,{at:[r[0]+1]})}},l.insertData=function(e){if(null!=Iy.getSelectedNodeByType(l,"table")){var t=e.getData("text/plain");"\n"===t||/<img[^>]+>/.test(e.getData("text/html"))?a(e):mh.insertText(l,t)}else a(e)},l.selectAll=function(){var e=l.selection;if(null!=e){var t=Iy.getSelectedNodeByType(l,"table-cell");if(null!=t){var n=e.anchor,r=e.focus;if(Cp.equals(n.path.slice(0,3),r.path.slice(0,3)))if(0!==_p.string(t).length){var o=Iy.findPath(l,t),i={anchor:mh.start(l,o),focus:mh.end(l,o)};l.select(i)}else u();else u()}else u()}else u()},function(e){var t=e.apply;e.apply=function(n){if(!Hp.isSelectionOperation(n)||!n.newProperties)return t(n);var r=Ig(Ig({},e.selection),n.newProperties);if(!Bp.isRange(r))return NT.unselect(e),t(n);var o=function(e){return kp.isElement(e)&&("table-cell"===e.type||"th"===e.type||"td"===e.type)},i=Lg(mh.nodes(e,{match:o,at:Bp.start(r),mode:"lowest"}),1)[0],a=Lg(mh.nodes(e,{match:o,at:Bp.end(r),mode:"lowest"}),1)[0];if(!i||!a)return NT.unselect(e),t(n);var s=Lg(i,2)[1],u=Lg(a,2)[1];if(Cp.equals(s,u)||!cT(e,[s,u],"table"))return NT.unselect(e),t(n);try{var l=dT(e,{at:s});if(!l||0===l.length)return NT.unselect(e),t(n);for(var c=fT.valueOf(0,0),d=fT.valueOf(0,0),f=!1,p=!1,h=0;h<l.length;h+=1)if(l[h])for(var g=0;g<l[h].length;g+=1)if(l[h][g]){var v=Lg(l[h][g],1),m=Lg(v[0],2)[1];Cp.equals(s,m)&&(c.x=h,c.y=g,f=!0),Cp.equals(u,m)&&(d.x=h,d.y=g,p=!0)}if(!f||!p)return NT.unselect(e),t(n);for(var y=fT.valueOf(Math.min(c.x,d.x),Math.min(c.y,d.y)),b=fT.valueOf(Math.max(c.x,d.x),Math.max(c.y,d.y));;){var E=fT.valueOf(y.x,y.y),w=fT.valueOf(b.x,b.y);for(h=E.x;h<=w.x&&h<l.length;h+=1)if(l[h])for(g=E.y;g<=w.y&&g<l[h].length;g+=1)if(l[h][g]){var C=Lg(l[h][g],2)[1];if(C){var D=C.rtl,A=C.ltr,S=C.btt,O=C.ttb;E.x=Math.min(E.x,h-(O-1)),E.y=Math.min(E.y,g-(D-1)),w.x=Math.max(w.x,h+(S-1)),w.y=Math.max(w.y,g+(A-1))}}if(fT.equals(y,E)&&fT.equals(b,w))break;y=E,b=w}var x=[],N=new WeakSet;for(h=y.x;h<=b.x&&h<l.length;h+=1)if(l[h]){var B=[];for(g=y.y;g<=b.y&&g<l[h].length;g+=1)if(l[h][g]){var T=Lg(l[h][g],1),k=Lg(T[0],1)[0];k&&(N.add(k),B.push(l[h][g]))}B.length>0&&x.push(B)}gT.set(e,x),vT.set(e,N)}catch(r){return NT.unselect(e),t(n)}t(n)}}(l),l.getTableSelection=function(){return gT.get(l)||null};var c=l.addMark,d=l.removeMark,f=Ig({},Wh);return l.addMark=function(e,t){var n=gT.get(l);if(n&&n.length>0){var r=l.selection;n.forEach(function(n){n.forEach(function(n){var r=Lg(n[0],2)[1],o=mh.start(l,r),i=mh.end(l,r);Wh.select(l,{anchor:o,focus:i}),c(e,t)})}),r&&Wh.select(l,r)}else c(e,t)},l.removeMark=function(e){var t=gT.get(l);if(t&&t.length>0){var n=l.selection;t.forEach(function(t){t.forEach(function(t){var n=Lg(t[0],2)[1],r=mh.start(l,n),o=mh.end(l,n);Wh.select(l,{anchor:r,focus:o}),d(e)})}),n&&Wh.select(l,n)}else d(e)},Wh.setNodes=function(e,t,n){if(void 0===n&&(n={}),e===l){var r=gT.get(l);if(r&&r.length>0)return"hidden"in t||"rowSpan"in t||"colSpan"in t?void f.setNodes(e,t,n):void r.forEach(function(r){r.forEach(function(r){var o=Lg(r[0],2)[1];f.setNodes(e,t,Ig(Ig({},n),{at:o}))})})}f.setNodes(e,t,n)},l}};YE("en",{uploadImgModule:{uploadImage:"Upload Image",uploadError:"{{fileName}} upload error"}}),YE("zh-CN",{uploadImgModule:{uploadImage:"上传图片",uploadError:"{{fileName}} 上传出错"}});bm&&(Zv.fn.append=bm),am&&(Zv.fn.on=am),Sm&&(Zv.fn.remove=Sm),im&&(Zv.fn.val=im),Bm&&(Zv.fn.click=Bm),dm&&(Zv.fn.hide=dm);var Ok=new WeakMap;function xk(e){return e.getMenuConfig("uploadImage")}function Nk(e,t){return Pg(this,void 0,void 0,function(){return Rg(this,function(n){return[2,new Promise(function(n){var r=new FileReader;r.readAsDataURL(t),r.onload=function(){var o=r.result;if(o){var i=o.toString(),a=0===i.indexOf("data:image")?"":i;Zx(e,i,t.name,a),n("ok")}}})]})})}function Bk(e,t){return Pg(this,void 0,void 0,function(){var n,r;return Rg(this,function(o){switch(o.label){case 0:return n=function(e){var t=Ok.get(e);if(null!=t)return t;var n=xk(e),r=n.onSuccess,o=n.onProgress,i=n.onFailed,a=n.customInsert,s=n.onError;return t=KS(Ig(Ig({},n),{onProgress:function(t){e.showProgressBar(t),o&&o(t)},onSuccess:function(t,n){if(a)return a(n,function(t,n,r){return Zx(e,t,n,r)}),void r(t,n);var o=n.errno,s=void 0===o?1:o,u=n.data,l=void 0===u?{}:u;if(0===s){if(Array.isArray(l))l.forEach(function(t){var n=t.url,r=void 0===n?"":n,o=t.alt,i=void 0===o?"":o,a=t.href;Zx(e,r,i,void 0===a?"":a)});else{var c=l.url,d=void 0===c?"":c,f=l.alt,p=void 0===f?"":f,h=l.href;Zx(e,d,p,void 0===h?"":h)}r(t,n)}else i(t,n)},onError:function(e,t,n){s(e,t,n)}})),Ok.set(e,t),t}(e),r=t.map(function(e){return{name:e.name,type:e.type,size:e.size,data:e}}),n.addFiles(r),[4,n.upload()];case 1:return o.sent(),[2]}})})}function Tk(e,t){return Pg(this,void 0,void 0,function(){var n,r,o,i,a,s,u,l,c,d,f,p,h,g,v;return Rg(this,function(m){switch(m.label){case 0:if(null==t)return[2];n=Array.prototype.slice.call(t),r=xk(e),o=r.customUpload,i=r.base64LimitSize,a=[],m.label=1;case 1:m.trys.push([1,10,11,16]),s=!0,u=jg(n),m.label=2;case 2:return[4,u.next()];case 3:return l=m.sent(),(p=l.done)?[3,9]:(v=l.value,s=!1,d=(c=v).size,i&&d<=i?[4,Nk(e,c)]:[3,5]);case 4:return m.sent(),[3,8];case 5:return o?[4,o(c,function(t,n,r){return Zx(e,t,n,r)},e)]:[3,7];case 6:return m.sent(),[3,8];case 7:a.push(c),m.label=8;case 8:return s=!0,[3,2];case 9:return[3,16];case 10:return f=m.sent(),h={error:f},[3,16];case 11:return m.trys.push([11,,14,15]),s||p||!(g=u.return)?[3,13]:[4,g.call(u)];case 12:m.sent(),m.label=13;case 13:return[3,15];case 14:if(h)throw h.error;return[7];case 15:return[7];case 16:return a.length>0?[4,Bk(e,a)]:[3,18];case 17:m.sent(),m.label=18;case 18:return[2]}})})}var kk=function(){function e(){this.title=QE("uploadImgModule.uploadImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M828.708571 585.045333a48.761905 48.761905 0 0 0-48.737523 48.761905v18.529524l-72.143238-72.167619a135.972571 135.972571 0 0 0-191.585524 0l-34.133334 34.133333-120.880762-120.953905a138.898286 138.898286 0 0 0-191.585523 0l-72.167619 72.167619V292.400762a48.786286 48.786286 0 0 1 48.761904-48.761905h341.23581a48.737524 48.737524 0 0 0 34.474667-83.285333 48.737524 48.737524 0 0 0-34.474667-14.287238H146.236952A146.212571 146.212571 0 0 0 0 292.400762v585.289143A146.358857 146.358857 0 0 0 146.236952 1024h584.996572a146.212571 146.212571 0 0 0 146.236952-146.310095V633.807238a48.786286 48.786286 0 0 0-48.761905-48.761905zM146.261333 926.45181a48.737524 48.737524 0 0 1-48.761904-48.761905v-174.128762l141.409523-141.458286a38.497524 38.497524 0 0 1 53.126096 0l154.526476 154.624 209.627428 209.724953H146.236952z m633.734096-48.761905c-0.073143 9.337905-3.145143 18.383238-8.777143 25.843809l-219.843048-220.94019 34.133333-34.133334a37.546667 37.546667 0 0 1 53.613715 0l140.873143 141.897143V877.714286zM1009.615238 160.231619L863.329524 13.897143a48.737524 48.737524 0 0 0-16.091429-10.24c-11.849143-4.87619-25.161143-4.87619-37.059047 0a48.761905 48.761905 0 0 0-16.067048 10.24l-146.236952 146.334476a49.005714 49.005714 0 0 0 69.217523 69.241905l62.902858-63.390476v272.627809a48.761905 48.761905 0 1 0 97.475047 0V166.083048l62.902857 63.390476a48.737524 48.737524 0 0 0 69.217524 0 48.761905 48.761905 0 0 0 0-69.241905z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return Kx(e)},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadImage")},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i(function(t,n,r){return Zx(e,t,n,r)});else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var s=Zv("body"),u=Zv('<input type="file" '.concat(a," multiple/>"));u.hide(),s.append(u),u.click(),u.on("change",function(){var t=u[0].files;Tk(e,t)})}},e}();var Fk={menus:[{key:"uploadImage",factory:function(){return new kk},config:{server:"",fieldName:"wangeditor-uploaded-image",maxFileSize:2097152,maxNumberOfFiles:100,allowedFileTypes:["image/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:1e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'".concat(e.name,"' upload failed"),t)},onError:function(e,t,n){console.error("'".concat(e.name,"' upload error"),n)},base64LimitSize:0}}],editorPlugin:function(e){var t=e.insertData,n=e;return n.insertData=function(r){if(Kx(n))t(r);else if(r.getData("text/plain"))t(r);else{var o=r.files;if(o.length<=0)t(r);else Array.prototype.slice.call(o).some(function(e){return"image"===Lg(e.type.split("/"),1)[0]})?Tk(e,o):t(r)}},n}};function Ik(e){return e.length?e[0].tagName.toLowerCase():""}function Pk(e,t,n,r){void 0===t&&(t="auto"),void 0===n&&(n="auto"),void 0===r&&(r={});var o=Zv(e),i=r.width,a=void 0===i?"":i,s=r.height,u=void 0===s?"":s,l="";return a&&(l+="width: ".concat(a,";")),u&&(l+="height: ".concat(u,";")),o.attr("width",t),o.attr("height",n),o.attr("style",l),o[0].outerHTML}YE("en",{videoModule:{delete:"Delete",uploadVideo:"Upload video",insertVideo:"Insert video",videoSrc:"Video source",videoSrcPlaceHolder:"Video file url, or third-party <iframe>",videoPoster:"Video poster",videoPosterPlaceHolder:"Poster image url",ok:"Ok",editSize:"Edit size",edit:"Edit video",width:"Width",height:"Height"}}),YE("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",edit:"编辑视频",width:"宽度",height:"高度"}}),bm&&(Zv.fn.append=bm),am&&(Zv.fn.on=am),Tm&&(Zv.fn.focus=Tm),tm&&(Zv.fn.attr=tm),im&&(Zv.fn.val=im),vm&&(Zv.fn.html=vm),wm&&(Zv.fn.parent=wm),em&&(Zv.fn.hasClass=em),Om&&(Zv.fn.empty=Om);var Rk={type:"video",elemToHtml:function(e,t){var n=e,r=n.src,o=void 0===r?"":r,i=n.poster,a=void 0===i?"":i,s=n.width,u=void 0===s?"auto":s,l=n.height,c=void 0===l?"auto":l,d=n.style,f=void 0===d?{}:d,p=n.textAlign,h='<div data-w-e-type="video" data-w-e-is-void style="text-align: '.concat(void 0===p?"center":p,';">\n');if(0===o.trim().indexOf("<iframe ")){h+=Pk(o,u,c,f)}else{var g=f.width,v=void 0===g?"":g,m=f.height,y=void 0===m?"":m,b="";v&&(b+="width: ".concat(v,";")),y&&(b+="height: ".concat(y,";")),h+='<video poster="'.concat(a,'" controls="true" width="').concat(u,'" height="').concat(c,'" style="').concat(b,'"><source src="').concat(o,'" type="video/mp4"/></video>')}return h+="\n</div>"}};function _k(e){return void 0===e&&(e="r"),"".concat(e,"-").concat(Fm())}function Lk(e){var t={};return e.trim().split(";").forEach(function(e){if(e){var n=Lg(e.split(":"),2),r=n[0],o=n[1];r&&o&&(t[r.trim()]=o.trim())}}),t}function Mk(){return _k("w-e-insert-video")}var jk=function(){function e(){this.title=QE("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=Mk(),this.heightInputId=Mk(),this.buttonId=Mk()}return e.prototype.getSelectedVideoNode=function(e){return Iy.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=t.widthInputId,r=t.heightInputId,o=t.buttonId,i=Lg(cw(QE("videoModule.width"),n,"auto"),2),a=i[0],s=Zv(i[1]),u=Lg(cw(QE("videoModule.height"),r,"auto"),2),l=u[0],c=Zv(u[1]),d=Lg(fw(o,QE("videoModule.ok")),1)[0],f=this.getSelectedVideoNode(e);if(null==this.$content){var p=Zv("<div></div>");p.on("click","#".concat(o),function(t){t.preventDefault();var o=p.find("#".concat(n)).val().trim(),i=p.find("#".concat(r)).val().trim(),a=function(e){return/^\d+(\.\d+)?%$/.test(e)},s=function(e){return/^\d+(\.\d+)?$/.test(e)},u="auto",l="auto";a(o)?u=o:s(o)&&(u="".concat(parseInt(o,10),"px")),a(i)?l=i:s(i)&&(l="".concat(parseInt(i,10),"px"));var c=f.style,d=void 0===c?{}:c;e.restoreSelection();var h={style:Ig(Ig({},d),{width:u,height:l})};Wh.setNodes(e,h,{match:function(e){return Iy.checkNodeType(e,"video")}}),e.hidePanelOrModal()}),this.$content=p}var h=this.$content;if(h.empty(),h.append(a),h.append(l),h.append(d),null==f)return h[0];var g=f.style,v=void 0===g?{}:g,m=v.width,y=void 0===m?"":m,b=v.height,E=void 0===b?"":b;return s.val(y),c.val(E),setTimeout(function(){s.focus()}),h[0]},e}();function Hk(){return _k("w-e-edit-video")}var zk=function(){function e(){this.title=QE("videoModule.edit"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=Hk(),this.posterInputId=Hk(),this.buttonId=Hk()}return e.prototype.getSelectedVideoNode=function(e){return Iy.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.posterInputId,i=n.buttonId,a=Lg(cw(QE("videoModule.videoSrc"),r,QE("videoModule.videoSrcPlaceHolder")),2),s=a[0],u=a[1],l=Lg(cw(QE("videoModule.videoPoster"),o,QE("videoModule.videoPosterPlaceHolder")),2),c=l[0],d=l[1],f=Zv(u),p=Zv(d),h=Lg(fw(i,QE("videoModule.ok")),1)[0];if(null==this.$content){var g=Zv("<div></div>");g.on("click","#".concat(i),function(n){return Pg(t,void 0,void 0,function(){var t,i,a,s;return Rg(this,function(u){return n.preventDefault(),t=g.find("#".concat(r)).val().trim(),i=g.find("#".concat(o)).val().trim(),a=_k("video-"),s={src:t,poster:i,key:a},e.restoreSelection(),Wh.setNodes(e,s,{match:function(e){return Iy.checkNodeType(e,"video")}}),e.hidePanelOrModal(),[2]})})}),this.$content=g}var v=this.$content;v.empty(),v.append(s),v.append(c),v.append(h);var m=this.getSelectedVideoNode(e);if(null==m)return v[0];var y=m.src,b=void 0===y?"":y,E=m.poster,w=void 0===E?"":E;return f.val(b),p.val(w),setTimeout(function(){f.focus()}),v[0]},e}();function $k(e,t){return Pg(this,arguments,void 0,function(e,t,n,r,o){var i,a,s,u,l,c,d;return void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o=""),Rg(this,function(f){switch(f.label){case 0:return t?(e.restoreSelection(),i=e.getMenuConfig("insertVideo"),a=i.onInsertedVideo,s=i.checkVideo,u=i.parseVideoSrc,[4,s(t,n)]):[2];case 1:return"string"==typeof(l=f.sent())?(e.alert(l,"error"),[2]):null==l?[2]:[4,u(t)];case 2:return 0!==(c=f.sent()).trim().indexOf("<iframe ")&&(c=function(e){return e.replace(/</g,"<").replace(/>/g,">")}(c)),d={type:"video",src:c,poster:n,children:[{text:""}],style:{width:r,height:o}},Promise.resolve().then(function(){Iy.isSelectedEmptyParagraph(e)&&Wh.removeNodes(e,{mode:"highest"}),Wh.insertNodes(e,d,{mode:"highest"})}),a(d),[2]}})})}function Uk(){return _k("w-e-insert-video")}var Vk=function(){function e(){this.title=QE("videoModule.insertVideo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.srcInputId=Uk(),this.posterInputId=Uk(),this.buttonId=Uk()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Bp.isCollapsed(t)||!!Iy.getSelectedElems(e).some(function(t){var n=Iy.getNodeType(t);return"pre"===n||("list-item"===n||!!e.isVoid(t))}))},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.posterInputId,i=n.buttonId,a=Lg(cw(QE("videoModule.videoSrc"),r,QE("videoModule.videoSrcPlaceHolder")),2),s=a[0],u=a[1],l=Lg(cw(QE("videoModule.videoPoster"),o,QE("videoModule.videoPosterPlaceHolder")),2),c=l[0],d=l[1],f=Zv(u),p=Zv(d),h=Lg(fw(i,QE("videoModule.ok")),1)[0];if(null==this.$content){var g=Zv("<div></div>");g.on("click","#".concat(i),function(n){return Pg(t,void 0,void 0,function(){var t,i;return Rg(this,function(a){switch(a.label){case 0:return n.preventDefault(),t=g.find("#".concat(r)).val().trim(),i=g.find("#".concat(o)).val().trim(),[4,$k(e,t,i)];case 1:return a.sent(),e.hidePanelOrModal(),[2]}})})}),this.$content=g}var v=this.$content;return v.empty(),v.append(s),v.append(c),v.append(h),f.val(""),p.val(""),setTimeout(function(){f.focus()}),v[0]},e}();function Wk(e){return e.getMenuConfig("uploadVideo")}var Gk=new WeakMap;function qk(e,t){return Pg(this,void 0,void 0,function(){var n,r;return Rg(this,function(o){switch(o.label){case 0:return n=function(e){var t=Gk.get(e);if(null!=t)return t;var n=Wk(e),r=n.onSuccess,o=n.onProgress,i=n.onFailed,a=n.customInsert,s=n.onError;return t=KS(Ig(Ig({},n),{onProgress:function(t){e.showProgressBar(t),o&&o(t)},onSuccess:function(t,n){if(a)return a(n,function(t,n){return $k(e,t,n)}),void r(t,n);var o=n.errno,s=void 0===o?1:o,u=n.data,l=void 0===u?{}:u;if(0===s){var c=l.url,d=void 0===c?"":c,f=l.poster;$k(e,d,void 0===f?"":f),r(t,n)}else i(t,n)},onError:function(e,t,n){s(e,t,n)}})),Gk.set(e,t),t}(e),r=t.map(function(e){return{name:e.name,type:e.type,size:e.size,data:e}}),n.addFiles(r),[4,n.upload()];case 1:return o.sent(),[2]}})})}var Kk=function(){function e(){this.title=QE("videoModule.uploadVideo"),this.iconSvg='<svg viewBox="0 0 1056 1024"><path d="M805.902261 521.819882a251.441452 251.441452 0 0 0-251.011972 246.600033 251.051015 251.051015 0 1 0 502.023944 8.823877 253.237463 253.237463 0 0 0-251.011972-255.42391z m59.463561 240.001647v129.898403h-116.701631v-129.898403h-44.041298l101.279368-103.504859 101.279368 103.504859z" p-id="6802"></path><path d="M788.254507 0.000781H99.094092A98.663439 98.663439 0 0 0 0.001171 99.093701v590.067495a98.663439 98.663439 0 0 0 99.092921 99.092921h411.7549a266.434235 266.434235 0 0 1-2.186448-41.815807 275.843767 275.843767 0 0 1 275.180024-270.729042 270.650955 270.650955 0 0 1 103.504859 19.834201V99.093701A101.51363 101.51363 0 0 0 788.254507 0.000781zM295.054441 640.747004V147.507894l394.146189 246.600033z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i(function(t,n){return $k(e,t,n)});else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var s=Zv("body"),u=Zv('<input type="file" '.concat(a," multiple/>"));u.hide(),s.append(u),u.click(),u.on("change",function(){var t=u[0].files;!function(e,t){Pg(this,void 0,void 0,function(){var n,r,o,i,a,s,u,l,c,d,f,p;return Rg(this,function(h){switch(h.label){case 0:if(null==t)return[2];n=Array.prototype.slice.call(t),r=[],o=Wk(e).customUpload,h.label=1;case 1:h.trys.push([1,8,9,14]),i=!0,a=jg(n),h.label=2;case 2:return[4,a.next()];case 3:return s=h.sent(),(c=s.done)?[3,7]:(p=s.value,i=!1,u=p,o?[4,o(u,function(t,n){return $k(e,t,n)},e)]:[3,5]);case 4:return h.sent(),[3,6];case 5:r.push(u),h.label=6;case 6:return i=!0,[3,2];case 7:return[3,14];case 8:return l=h.sent(),d={error:l},[3,14];case 9:return h.trys.push([9,,12,13]),i||c||!(f=a.return)?[3,11]:[4,f.call(a)];case 10:h.sent(),h.label=11;case 11:return[3,13];case 12:if(d)throw d.error;return[7];case 13:return[7];case 14:return r.length>0?[4,qk(e,r)]:[3,16];case 15:h.sent(),h.label=16;case 16:return[2]}})})}(e,t)})}},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Bp.isCollapsed(t)||!!Iy.getSelectedElems(e).some(function(t){var n=Iy.getNodeType(t);return"pre"===n||("list-item"===n||!!e.isVoid(t))}))},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadVideo")},e}();function Yk(e,t,n,r,o,i){return void 0===t&&(t=""),void 0===n&&(n="auto"),void 0===r&&(r="auto"),void 0===o&&(o={}),void 0===i&&(i="center"),{type:"video",src:e,poster:t,width:n,height:r,style:o,children:[{text:""}],textAlign:i}}var Xk={selector:'div[data-w-e-type="video"]',parseElemHtml:function(e,t,n){var r=Zv(e),o="",i="",a="auto",s="auto",u={},l=r.find("iframe");if(l.length>0)return a=l.attr("width")||"auto",s=l.attr("height")||"auto",u=Lk(u=l.attr("style")||""),Yk(o=l[0].outerHTML,i,a,s,u,Lk(r.attr("style")||"")["text-align"]||"center");var c=r.find("video");return(o=c.attr("src")||"")||c.length>0&&(o=c.find("source").attr("src")||""),a=c.attr("width")||"auto",s=c.attr("height")||"auto",Yk(o,i=c.attr("poster")||"",a,s,u=Lk(u=c.attr("style")||""),Lk(r.attr("style")||"")["text-align"]||"center")}};var Zk={selector:"iframe,video,p",preParseHtml:function(e){var t=Zv(e),n=t;if("p"===Ik(t)){var r=t.children();if(1===r.length){var o=r[0],i=o.tagName.toLowerCase();["iframe","video"].includes(i)&&(n=Zv(o))}}var a=Ik(n);if("iframe"!==a&&"video"!==a)return n[0];if("video"===n.parent().attr("data-w-e-type"))return n[0];var s=Zv('<div data-w-e-type="video" data-w-e-is-void style="text-align: center;"></div>');return s.append(n),s[0]}};var Jk={type:"video",renderElem:function(e,t,n){var r,o=e,i=o.src,a=void 0===i?"":i,s=o.poster,u=void 0===s?"":s,l=o.key,c=void 0===l?"":l,d=o.width,f=void 0===d?"auto":d,p=o.height,h=void 0===p?"auto":p,g=o.style,v=void 0===g?{}:g,m=o.textAlign,y=void 0===m?"center":m,b=Iy.isNodeSelected(n,e);if(0===a.trim().indexOf("<iframe ")){r=BC("div",{className:"w-e-textarea-video-container","data-selected":b?"true":"",style:{textAlign:y},innerHTML:Pk(a,f,h,v)})}else{var E=BC("video",{key:c,poster:u,controls:!0,style:v},BC("source",{src:a,type:"video/mp4"}),"Sorry, your browser doesn't support embedded videos.\n 抱歉,浏览器不支持 video 视频");"auto"!==f&&(E.data.width=f),"auto"!==h&&(E.data.height=h),r=BC("div",{className:"w-e-textarea-video-container","data-selected":b?"true":"",style:{textAlign:y}},E)}var w=lC("div",{props:{contentEditable:!1},on:{mousedown:function(e){return e.preventDefault()}}},r);return w}},Qk={renderElems:[Jk],elemsToHtml:[Rk],preParseHtml:[Zk],parseElemsHtml:[Xk],menus:[{key:"insertVideo",factory:function(){return new Vk},config:{onInsertedVideo:function(e){},checkVideo:function(e,t){return!0},parseVideoSrc:function(e){return e}}},{key:"uploadVideo",factory:function(){return new Kk},config:{server:"",fieldName:"wangeditor-uploaded-video",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["video/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'".concat(e.name,"' upload failed"),t)},onError:function(e,t,n){console.error("'".concat(e.name," upload error"),t,n)}}},{key:"editVideoSize",factory:function(){return new jk}},{key:"editVideoSrc",factory:function(){return new zk}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(e){return"video"===e.type||t(e)},r.normalizeNode=function(e){var t=Lg(e,2),o=t[0],i=t[1];"video"===Iy.getNodeType(o)&&(Iy.isLastNode(r,o)&&Wh.insertNodes(r,Iy.genEmptyParagraph(),{at:[i[0]+1]}));return n([o,i])},r}},eF=function(){function e(){throw new Error("不能实例化\nCan not construct a instance")}return e.setEditorConfig=function(e){void 0===e&&(e={}),this.editorConfig=Ig(Ig({},this.editorConfig),e)},e.setSimpleEditorConfig=function(e){void 0===e&&(e={}),this.simpleEditorConfig=Ig(Ig({},this.simpleEditorConfig),e)},e.setToolbarConfig=function(e){void 0===e&&(e={}),this.toolbarConfig=Ig(Ig({},this.toolbarConfig),e)},e.setSimpleToolbarConfig=function(e){void 0===e&&(e={}),this.simpleToolbarConfig=Ig(Ig({},this.simpleToolbarConfig),e)},e.registerPlugin=function(e){this.plugins.push(e)},e.registerMenu=function(e,t){lv(e,t)},e.registerRenderElem=function(e){var t,n,r;n=(t=e).type,r=t.renderElem,IC[n||""]=r},e.registerRenderStyle=function(e){!function(e){TC.push(e)}(e)},e.registerElemToHtml=function(e){!function(e){var t=e.type,n=e.elemToHtml;my[t||""]=n}(e)},e.registerStyleToHtml=function(e){!function(e){hy.push(e)}(e)},e.registerPreParseHtml=function(e){var t;t=e,ey.push(t)},e.registerParseElemHtml=function(e){!function(e){var t=e.selector,n=e.parseElemHtml;ny[t]=n}(e)},e.registerParseStyleHtml=function(e){!function(e){ty.push(e)}(e)},e.registerModule=function(e){tF(e)},e.editorConfig={},e.simpleEditorConfig={},e.toolbarConfig={},e.simpleToolbarConfig={},e.plugins=[],e}();function tF(e){var t=e.menus,n=e.renderElems,r=e.renderStyle,o=e.elemsToHtml,i=e.styleToHtml,a=e.preParseHtml,s=e.parseElemsHtml,u=e.parseStyleHtml,l=e.editorPlugin;t&&t.forEach(function(e){return eF.registerMenu(e)}),n&&n.forEach(function(e){return eF.registerRenderElem(e)}),r&&eF.registerRenderStyle(r),o&&o.forEach(function(e){return eF.registerElemToHtml(e)}),i&&eF.registerStyleToHtml(i),a&&a.forEach(function(e){return eF.registerPreParseHtml(e)}),s&&s.forEach(function(e){return eF.registerParseElemHtml(e)}),u&&eF.registerParseStyleHtml(u),l&&eF.registerPlugin(l)}CB.forEach(function(e){return tF(e)}),tF(rT),tF(Sk),tF(Qk),tF(Fk),tF(HB);var nF='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>';var rF={link:{menuKeys:["editLink","unLink","viewLink"]},image:{menuKeys:["imageWidth30","imageWidth50","imageWidth100","editorImageSizeMenu","editImage","viewImageLink","deleteImage"]},pre:{menuKeys:["enter","codeBlock","codeSelectLang"]},table:{menuKeys:["enter","tableHeader","tableFullWidth","insertTableRow","deleteTableRow","insertTableCol","deleteTableCol","deleteTable","mergeTableCell","splitTableCell","setTableProperty","setTableCellProperty"]},divider:{menuKeys:["enter"]},video:{menuKeys:["enter","editVideoSize","editVideoSrc"]}};var oF={hoverbarKeys:Ig(Ig({},rF),{text:{menuKeys:["formatPainter","headerSelect","insertLink","bulletedList","|","bold","through","color","bgColor","clearStyle"]}})};eF.setEditorConfig(Ig(Ig({},oF),{decorate:_B}));var iF={hoverbarKeys:rF};eF.setSimpleEditorConfig(Ig(Ig({},iF),{decorate:_B}));var aF={toolbarKeys:["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:QE("editor.more"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList","todo",{key:"group-justify",title:QE("editor.justify"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:QE("editor.indent"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',menuKeys:["indent","delIndent"]},"|","emotion","insertLink",{key:"group-image",title:QE("editor.image"),iconSvg:nF,menuKeys:["insertImage","uploadImage"]},{key:"group-video",title:QE("editor.video"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',menuKeys:["insertVideo","uploadVideo"]},"insertTable","codeBlock","divider","|","undo","redo","|","formatPainter","fullScreen"]};eF.setToolbarConfig(aF);var sF={toolbarKeys:["blockquote","header1","header2","header3","|","bold","underline","italic","through","color","bgColor","clearStyle","|","bulletedList","numberedList","todo","justifyLeft","justifyRight","justifyCenter","|","insertLink",{key:"group-image",title:QE("editor.image"),iconSvg:nF,menuKeys:["insertImage","uploadImage"]},"insertVideo","insertTable","codeBlock","|","undo","redo","|","fullScreen"]};function uF(e){void 0===e&&(e={});var t=e.selector,n=void 0===t?"":t,r=e.content,o=void 0===r?[]:r,i=e.html,a=e.config,s=void 0===a?{}:a,u=e.mode,l="simple"===(void 0===u?"default":u)?eF.simpleEditorConfig:eF.editorConfig,c=Ig(Ig({},l.hoverbarKeys||{}),s.hoverbarKeys||{});return KC({selector:n,config:Ig(Ig(Ig({},l),s),{hoverbarKeys:c}),content:o,html:i,plugins:eF.plugins})}function lF(e){var t=e.selector,n=e.editor,r=e.config,o=void 0===r?{}:r,i=e.mode,a=void 0===i?"default":i;if(!t)throw new Error("Cannot find 'selector' when create toolbar");var s="simple"===a?eF.simpleToolbarConfig:eF.toolbarConfig;return XC(n,{selector:t,config:Ig(Ig({},s),o)})}eF.setSimpleToolbarConfig(sF);var cF={};export{eF as Boot,Iy as DomEditor,mh as SlateEditor,kp as SlateElement,yh as SlateLocation,_p as SlateNode,Cp as SlatePath,wh as SlatePoint,Bp as SlateRange,Nh as SlateText,Wh as SlateTransforms,YC as Toolbar,uF as createEditor,lF as createToolbar,KS as createUploader,cF as default,fw as genModalButtonElems,cw as genModalInputElems,dw as genModalTextareaElems,YE as i18nAddResources,XE as i18nChangeLanguage,ZE as i18nGetResources,QE as t};
|
|
20
|
+
*/e.exports&&(e.exports=t),void 0!==y&&(y.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:t.languages[n]};var i={};i[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:o},t.languages.insertBefore("markup","cdata",i)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(void 0!==t&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},n="data-src-status",r="loading",o="loaded",i="pre[data-src]:not(["+n+'="'+o+'"]):not(['+n+'="'+r+'"])';t.hooks.add("before-highlightall",function(e){e.selector+=", "+i}),t.hooks.add("before-sanity-check",function(a){var s=a.element;if(s.matches(i)){a.code="",s.setAttribute(n,r);var u=s.appendChild(document.createElement("CODE"));u.textContent="Loading…";var l=s.getAttribute("data-src"),c=a.language;if("none"===c){var d=(/\.(\w+)$/.exec(l)||[,"none"])[1];c=e[d]||d}t.util.setLanguage(u,c),t.util.setLanguage(s,c);var f=t.plugins.autoloader;f&&f.loadLanguages(c),function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?t(r.responseText):r.status>=400?n("✖ Error "+r.status+" while fetching file: "+r.statusText):n("✖ Error: File does not exist or is empty"))},r.send(null)}(l,function(e){s.setAttribute(n,o);var r=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],o=t[3];return r?o?[n,Number(o)]:[n,void 0]:[n,n]}}(s.getAttribute("data-range"));if(r){var i=e.split(/\r\n?|\n/g),a=r[0],l=null==r[1]?i.length:r[1];a<0&&(a+=i.length),a=Math.max(0,Math.min(a-1,i.length)),l<0&&(l+=i.length),l=Math.max(0,Math.min(l,i.length)),e=i.slice(a,l).join("\n"),s.hasAttribute("data-start")||s.setAttribute("data-start",String(a+1))}u.textContent=e,t.highlightElement(u)},function(e){s.setAttribute(n,"failed"),u.textContent=e})}}),t.plugins.fileHighlight={highlight:function(e){for(var n,r=(e||document).querySelectorAll(i),o=0;n=r[o++];)t.highlightElement(n)}};var a=!1;t.fileHighlight=function(){a||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),a=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}}()}(AB)),AB.exports),OB=b(SB);!function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function i(e,t){return e=e.replace(/<S>/g,function(){return n}).replace(/<BRACES>/g,function(){return r}).replace(/<SPREAD>/g,function(){return o}),RegExp(e,t)}o=i(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=i(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:i(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:i(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var a=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(a).join(""):""},s=function(t){for(var n=[],r=0;r<t.length;r++){var o=t[r],i=!1;if("string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===a(o.content[0].content[1])&&n.pop():"/>"===o.content[o.content.length-1].content||n.push({tagName:a(o.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&n.length>0&&0===n[n.length-1].openedBraces){var u=a(o);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(u+=a(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(u=a(t[r-1])+u,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",u,null,u)}o.content&&"string"!=typeof o.content&&s(o.content)}};e.hooks.add("after-tokenize",function(e){"jsx"!==e.language&&"tsx"!==e.language||s(e.tokens)})}(Prism);var xB;xB||(xB=1,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism)),Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"];var NB;NB||(NB=1,function(e){var t=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,n=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],r=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,o=/<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,i=/[{}\[\](),:;]/;e.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:t,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:r,operator:o,punctuation:i};var a={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:e.languages.php},s=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:a}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:a}}];e.languages.insertBefore("php","variable",{string:s,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:t,string:s,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:n,number:r,operator:o,punctuation:i}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),e.hooks.add("before-tokenize",function(t){/<\?/.test(t.code)&&e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")})}(Prism)),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean;var BB;BB||(BB=1,Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python);var TB;TB||(TB=1,function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism));var kB;kB||(kB=1,function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism));var FB;FB||(FB=1,function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+t[+n]+")"})}function n(e,n,r){return RegExp(t(e,n),"")}function r(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,function(){return"(?:"+e+")"});return e.replace(/<<self>>/g,"[^\\s\\S]")}var o="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface record struct",a="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",s="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function u(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var l=u(i),c=RegExp(u(o+" "+i+" "+a+" "+s)),d=u(i+" "+a+" "+s),f=u(o+" "+i+" "+s),p=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),h=r(/\((?:[^()]|<<self>>)*\)/.source,2),g=/@?\b[A-Za-z_]\w*\b/.source,v=t(/<<0>>(?:\s*<<1>>)?/.source,[g,p]),m=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,v]),y=/\[\s*(?:,\s*)*\]/.source,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[m,y]),E=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[p,h,y]),w=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[E]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[w,m,y]),D={keyword:c,punctuation:/[<>()?,.:[\]]/},A=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,S=/"(?:\\.|[^\\"\r\n])*"/.source,O=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[O]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[m]),lookbehind:!0,inside:D},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[g,C]),lookbehind:!0,inside:D},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[g]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[l,v]),lookbehind:!0,inside:D},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[m]),lookbehind:!0,inside:D},{pattern:n(/(\bwhere\s+)<<0>>/.source,[g]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[b]),lookbehind:!0,inside:D},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,f,g]),inside:D}],keyword:c,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[g]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[g]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:D},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[C,m]),inside:D,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[C]),lookbehind:!0,inside:D,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[g,p]),inside:{function:n(/^<<0>>/.source,[g]),generic:{pattern:RegExp(p),alias:"class-name",inside:D}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[l,v,g,C,c.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[v,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:c,"class-name":{pattern:RegExp(C),greedy:!0,inside:D},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var x=S+"|"+A,N=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[x]),B=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[N]),2),T=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,k=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[m,B]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[T,k]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[T]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[B]),inside:e.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var F=/:[^}\r\n]+/.source,I=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[N]),2),P=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[I,F]),R=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[x]),2),_=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[R,F]);function L(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,F]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[P]),lookbehind:!0,greedy:!0,inside:L(P,I)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[_]),lookbehind:!0,greedy:!0,inside:L(_,R)}],char:{pattern:RegExp(A),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism)),Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"],Prism.languages.vba=Prism.languages["visual-basic"],Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/};var IB;IB||(IB=1,function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism)),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift}),function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=r.variable[1].inside,a=0;a<o.length;a++)i[o[a]]=e.languages.bash[o[a]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(Prism),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var o=t[n];if("code"===o.type){var i=o.content[1],a=o.content[3];if(i&&a&&"code-language"===i.type&&"code-block"===a.type&&"string"==typeof i.content){var s=i.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp"),u="language-"+(s=(/[a-z][\w-]*/i.exec(s)||[""])[0].toLowerCase());a.alias?"string"==typeof a.alias?a.alias=[a.alias,u]:a.alias.push(u):a.alias=[u]}}else e(o.content)}}(e.tokens)}),e.hooks.add("wrap",function(t){if("code-block"===t.type){for(var n="",r=0,o=t.classes.length;r<o;r++){var i=t.classes[r],l=/language-(.+)/.exec(i);if(l){n=l[1];break}}var c=e.languages[n];if(c)t.content=e.highlight(function(e){var t=e.replace(a,"");return t=t.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(e,t){var n;if("#"===(t=t.toLowerCase())[0])return n="x"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1)),u(n);var r=s[t];return r||e}),t}(t.content),c,n);else if(n&&"none"!==n&&e.plugins.autoloader){var d="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=d,e.plugins.autoloader.loadLanguages(n,function(){var t=document.getElementById(d);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))})}}});var a=RegExp(e.languages.markup.tag.pattern.source,"gi"),s={amp:"&",lt:"<",gt:">",quot:'"'},u=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(Prism),Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/},function(e){var t={pattern:/((?:^|[^\\$])(?:\\{2})*)\$(?:\w+|\{[^{}]*\})/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}};e.languages.groovy=e.languages.extend("clike",{string:{pattern:/'''(?:[^\\]|\\[\s\S])*?'''|'(?:\\.|[^\\'\r\n])*'/,greedy:!0},keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|instanceof|int|interface|long|native|new|package|private|protected|public|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|trait|transient|try|void|volatile|while)\b/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),e.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment",greedy:!0},"interpolation-string":{pattern:/"""(?:[^\\]|\\[\s\S])*?"""|(["/])(?:\\.|(?!\1)[^\\\r\n])*\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}}}),e.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),e.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),t.inside.expression.inside=e.languages.groovy}(Prism),Prism.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:\*-INPUT|\?TO|ABAP-SOURCE|ABBREVIATED|ABS|ABSTRACT|ACCEPT|ACCEPTING|ACCESSPOLICY|ACCORDING|ACOS|ACTIVATION|ACTUAL|ADD|ADD-CORRESPONDING|ADJACENT|AFTER|ALIAS|ALIASES|ALIGN|ALL|ALLOCATE|ALPHA|ANALYSIS|ANALYZER|AND|ANY|APPEND|APPENDAGE|APPENDING|APPLICATION|ARCHIVE|AREA|ARITHMETIC|AS|ASCENDING|ASIN|ASPECT|ASSERT|ASSIGN|ASSIGNED|ASSIGNING|ASSOCIATION|ASYNCHRONOUS|AT|ATAN|ATTRIBUTES|AUTHORITY|AUTHORITY-CHECK|AVG|BACK|BACKGROUND|BACKUP|BACKWARD|BADI|BASE|BEFORE|BEGIN|BETWEEN|BIG|BINARY|BINDING|BIT|BIT-AND|BIT-NOT|BIT-OR|BIT-XOR|BLACK|BLANK|BLANKS|BLOB|BLOCK|BLOCKS|BLUE|BOUND|BOUNDARIES|BOUNDS|BOXED|BREAK-POINT|BT|BUFFER|BY|BYPASSING|BYTE|BYTE-CA|BYTE-CN|BYTE-CO|BYTE-CS|BYTE-NA|BYTE-NS|BYTE-ORDER|C|CA|CALL|CALLING|CASE|CAST|CASTING|CATCH|CEIL|CENTER|CENTERED|CHAIN|CHAIN-INPUT|CHAIN-REQUEST|CHANGE|CHANGING|CHANNELS|CHAR-TO-HEX|CHARACTER|CHARLEN|CHECK|CHECKBOX|CIRCULAR|CI_|CLASS|CLASS-CODING|CLASS-DATA|CLASS-EVENTS|CLASS-METHODS|CLASS-POOL|CLEANUP|CLEAR|CLIENT|CLOB|CLOCK|CLOSE|CN|CNT|CO|COALESCE|CODE|CODING|COLLECT|COLOR|COLUMN|COLUMNS|COL_BACKGROUND|COL_GROUP|COL_HEADING|COL_KEY|COL_NEGATIVE|COL_NORMAL|COL_POSITIVE|COL_TOTAL|COMMENT|COMMENTS|COMMIT|COMMON|COMMUNICATION|COMPARING|COMPONENT|COMPONENTS|COMPRESSION|COMPUTE|CONCAT|CONCATENATE|COND|CONDENSE|CONDITION|CONNECT|CONNECTION|CONSTANTS|CONTEXT|CONTEXTS|CONTINUE|CONTROL|CONTROLS|CONV|CONVERSION|CONVERT|COPIES|COPY|CORRESPONDING|COS|COSH|COUNT|COUNTRY|COVER|CP|CPI|CREATE|CREATING|CRITICAL|CS|CURRENCY|CURRENCY_CONVERSION|CURRENT|CURSOR|CURSOR-SELECTION|CUSTOMER|CUSTOMER-FUNCTION|DANGEROUS|DATA|DATABASE|DATAINFO|DATASET|DATE|DAYLIGHT|DBMAXLEN|DD\/MM\/YY|DD\/MM\/YYYY|DDMMYY|DEALLOCATE|DECIMALS|DECIMAL_SHIFT|DECLARATIONS|DEEP|DEFAULT|DEFERRED|DEFINE|DEFINING|DEFINITION|DELETE|DELETING|DEMAND|DEPARTMENT|DESCENDING|DESCRIBE|DESTINATION|DETAIL|DIALOG|DIRECTORY|DISCONNECT|DISPLAY|DISPLAY-MODE|DISTANCE|DISTINCT|DIV|DIVIDE|DIVIDE-CORRESPONDING|DIVISION|DO|DUMMY|DUPLICATE|DUPLICATES|DURATION|DURING|DYNAMIC|DYNPRO|E|EACH|EDIT|EDITOR-CALL|ELSE|ELSEIF|EMPTY|ENABLED|ENABLING|ENCODING|END|END-ENHANCEMENT-SECTION|END-LINES|END-OF-DEFINITION|END-OF-FILE|END-OF-PAGE|END-OF-SELECTION|ENDAT|ENDCASE|ENDCATCH|ENDCHAIN|ENDCLASS|ENDDO|ENDENHANCEMENT|ENDEXEC|ENDFOR|ENDFORM|ENDFUNCTION|ENDIAN|ENDIF|ENDING|ENDINTERFACE|ENDLOOP|ENDMETHOD|ENDMODULE|ENDON|ENDPROVIDE|ENDSELECT|ENDTRY|ENDWHILE|ENGINEERING|ENHANCEMENT|ENHANCEMENT-POINT|ENHANCEMENT-SECTION|ENHANCEMENTS|ENTRIES|ENTRY|ENVIRONMENT|EQ|EQUAL|EQUIV|ERRORMESSAGE|ERRORS|ESCAPE|ESCAPING|EVENT|EVENTS|EXACT|EXCEPT|EXCEPTION|EXCEPTION-TABLE|EXCEPTIONS|EXCLUDE|EXCLUDING|EXEC|EXECUTE|EXISTS|EXIT|EXIT-COMMAND|EXP|EXPAND|EXPANDING|EXPIRATION|EXPLICIT|EXPONENT|EXPORT|EXPORTING|EXTEND|EXTENDED|EXTENSION|EXTRACT|FAIL|FETCH|FIELD|FIELD-GROUPS|FIELD-SYMBOL|FIELD-SYMBOLS|FIELDS|FILE|FILTER|FILTER-TABLE|FILTERS|FINAL|FIND|FIRST|FIRST-LINE|FIXED-POINT|FKEQ|FKGE|FLOOR|FLUSH|FONT|FOR|FORM|FORMAT|FORWARD|FOUND|FRAC|FRAME|FRAMES|FREE|FRIENDS|FROM|FUNCTION|FUNCTION-POOL|FUNCTIONALITY|FURTHER|GAPS|GE|GENERATE|GET|GIVING|GKEQ|GKGE|GLOBAL|GRANT|GREATER|GREEN|GROUP|GROUPS|GT|HANDLE|HANDLER|HARMLESS|HASHED|HAVING|HDB|HEAD-LINES|HEADER|HEADERS|HEADING|HELP-ID|HELP-REQUEST|HIDE|HIGH|HINT|HOLD|HOTSPOT|I|ICON|ID|IDENTIFICATION|IDENTIFIER|IDS|IF|IGNORE|IGNORING|IMMEDIATELY|IMPLEMENTATION|IMPLEMENTATIONS|IMPLEMENTED|IMPLICIT|IMPORT|IMPORTING|IN|INACTIVE|INCL|INCLUDE|INCLUDES|INCLUDING|INCREMENT|INDEX|INDEX-LINE|INFOTYPES|INHERITING|INIT|INITIAL|INITIALIZATION|INNER|INOUT|INPUT|INSERT|INSTANCES|INTENSIFIED|INTERFACE|INTERFACE-POOL|INTERFACES|INTERNAL|INTERVALS|INTO|INVERSE|INVERTED-DATE|IS|ISO|ITERATOR|ITNO|JOB|JOIN|KEEP|KEEPING|KERNEL|KEY|KEYS|KEYWORDS|KIND|LANGUAGE|LAST|LATE|LAYOUT|LE|LEADING|LEAVE|LEFT|LEFT-JUSTIFIED|LEFTPLUS|LEFTSPACE|LEGACY|LENGTH|LESS|LET|LEVEL|LEVELS|LIKE|LINE|LINE-COUNT|LINE-SELECTION|LINE-SIZE|LINEFEED|LINES|LIST|LIST-PROCESSING|LISTBOX|LITTLE|LLANG|LOAD|LOAD-OF-PROGRAM|LOB|LOCAL|LOCALE|LOCATOR|LOG|LOG-POINT|LOG10|LOGFILE|LOGICAL|LONG|LOOP|LOW|LOWER|LPAD|LPI|LT|M|MAIL|MAIN|MAJOR-ID|MAPPING|MARGIN|MARK|MASK|MATCH|MATCHCODE|MAX|MAXIMUM|MEDIUM|MEMBERS|MEMORY|MESH|MESSAGE|MESSAGE-ID|MESSAGES|MESSAGING|METHOD|METHODS|MIN|MINIMUM|MINOR-ID|MM\/DD\/YY|MM\/DD\/YYYY|MMDDYY|MOD|MODE|MODIF|MODIFIER|MODIFY|MODULE|MOVE|MOVE-CORRESPONDING|MULTIPLY|MULTIPLY-CORRESPONDING|NA|NAME|NAMETAB|NATIVE|NB|NE|NESTED|NESTING|NEW|NEW-LINE|NEW-PAGE|NEW-SECTION|NEXT|NO|NO-DISPLAY|NO-EXTENSION|NO-GAP|NO-GAPS|NO-GROUPING|NO-HEADING|NO-SCROLLING|NO-SIGN|NO-TITLE|NO-TOPOFPAGE|NO-ZERO|NODE|NODES|NON-UNICODE|NON-UNIQUE|NOT|NP|NS|NULL|NUMBER|NUMOFCHAR|O|OBJECT|OBJECTS|OBLIGATORY|OCCURRENCE|OCCURRENCES|OCCURS|OF|OFF|OFFSET|OLE|ON|ONLY|OPEN|OPTION|OPTIONAL|OPTIONS|OR|ORDER|OTHER|OTHERS|OUT|OUTER|OUTPUT|OUTPUT-LENGTH|OVERFLOW|OVERLAY|PACK|PACKAGE|PAD|PADDING|PAGE|PAGES|PARAMETER|PARAMETER-TABLE|PARAMETERS|PART|PARTIALLY|PATTERN|PERCENTAGE|PERFORM|PERFORMING|PERSON|PF|PF-STATUS|PINK|PLACES|POOL|POSITION|POS_HIGH|POS_LOW|PRAGMAS|PRECOMPILED|PREFERRED|PRESERVING|PRIMARY|PRINT|PRINT-CONTROL|PRIORITY|PRIVATE|PROCEDURE|PROCESS|PROGRAM|PROPERTY|PROTECTED|PROVIDE|PUBLIC|PUSHBUTTON|PUT|QUEUE-ONLY|QUICKINFO|RADIOBUTTON|RAISE|RAISING|RANGE|RANGES|RAW|READ|READ-ONLY|READER|RECEIVE|RECEIVED|RECEIVER|RECEIVING|RED|REDEFINITION|REDUCE|REDUCED|REF|REFERENCE|REFRESH|REGEX|REJECT|REMOTE|RENAMING|REPLACE|REPLACEMENT|REPLACING|REPORT|REQUEST|REQUESTED|RESERVE|RESET|RESOLUTION|RESPECTING|RESPONSIBLE|RESULT|RESULTS|RESUMABLE|RESUME|RETRY|RETURN|RETURNCODE|RETURNING|RIGHT|RIGHT-JUSTIFIED|RIGHTPLUS|RIGHTSPACE|RISK|RMC_COMMUNICATION_FAILURE|RMC_INVALID_STATUS|RMC_SYSTEM_FAILURE|ROLE|ROLLBACK|ROUND|ROWS|RTTI|RUN|SAP|SAP-SPOOL|SAVING|SCALE_PRESERVING|SCALE_PRESERVING_SCIENTIFIC|SCAN|SCIENTIFIC|SCIENTIFIC_WITH_LEADING_ZERO|SCREEN|SCROLL|SCROLL-BOUNDARY|SCROLLING|SEARCH|SECONDARY|SECONDS|SECTION|SELECT|SELECT-OPTIONS|SELECTION|SELECTION-SCREEN|SELECTION-SET|SELECTION-SETS|SELECTION-TABLE|SELECTIONS|SELECTOR|SEND|SEPARATE|SEPARATED|SET|SHARED|SHIFT|SHORT|SHORTDUMP-ID|SIGN|SIGN_AS_POSTFIX|SIMPLE|SIN|SINGLE|SINH|SIZE|SKIP|SKIPPING|SMART|SOME|SORT|SORTABLE|SORTED|SOURCE|SPACE|SPECIFIED|SPLIT|SPOOL|SPOTS|SQL|SQLSCRIPT|SQRT|STABLE|STAMP|STANDARD|START-OF-SELECTION|STARTING|STATE|STATEMENT|STATEMENTS|STATIC|STATICS|STATUSINFO|STEP-LOOP|STOP|STRLEN|STRUCTURE|STRUCTURES|STYLE|SUBKEY|SUBMATCHES|SUBMIT|SUBROUTINE|SUBSCREEN|SUBSTRING|SUBTRACT|SUBTRACT-CORRESPONDING|SUFFIX|SUM|SUMMARY|SUMMING|SUPPLIED|SUPPLY|SUPPRESS|SWITCH|SWITCHSTATES|SYMBOL|SYNCPOINTS|SYNTAX|SYNTAX-CHECK|SYNTAX-TRACE|SYSTEM-CALL|SYSTEM-EXCEPTIONS|SYSTEM-EXIT|TAB|TABBED|TABLE|TABLES|TABLEVIEW|TABSTRIP|TAN|TANH|TARGET|TASK|TASKS|TEST|TESTING|TEXT|TEXTPOOL|THEN|THROW|TIME|TIMES|TIMESTAMP|TIMEZONE|TITLE|TITLE-LINES|TITLEBAR|TO|TOKENIZATION|TOKENS|TOP-LINES|TOP-OF-PAGE|TRACE-FILE|TRACE-TABLE|TRAILING|TRANSACTION|TRANSFER|TRANSFORMATION|TRANSLATE|TRANSPORTING|TRMAC|TRUNC|TRUNCATE|TRUNCATION|TRY|TYPE|TYPE-POOL|TYPE-POOLS|TYPES|ULINE|UNASSIGN|UNDER|UNICODE|UNION|UNIQUE|UNIT|UNIT_CONVERSION|UNIX|UNPACK|UNTIL|UNWIND|UP|UPDATE|UPPER|USER|USER-COMMAND|USING|UTF-8|VALID|VALUE|VALUE-REQUEST|VALUES|VARY|VARYING|VERIFICATION-MESSAGE|VERSION|VIA|VIEW|VISIBLE|WAIT|WARNING|WHEN|WHENEVER|WHERE|WHILE|WIDTH|WINDOW|WINDOWS|WITH|WITH-HEADING|WITH-TITLE|WITHOUT|WORD|WORK|WRITE|WRITER|X|XML|XOR|XSD|XSTRLEN|YELLOW|YES|YYMMDD|Z|ZERO|ZONE)(?![\w-])/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/};var PB=["comment","prolog","doctype","cdata","punctuation","namespace","property","tag","boolean","number","constant","symbol","deleted","selector","attr-name","string","builtin","inserted","operator","entity","url","string","atrule","attr-value","keyword","function","class-name","regex","important","variable","bold","italic","entity","char"];function RB(e){return"string"==typeof e?e.length:"string"==typeof e.content?e.content.length:e.content.reduce(function(e,t){return e+RB(t)},0)}var _B=function(e){var t,n,r,o=Lg(e,2),i=o[0],a=o[1],s=[],u=function(e){if(!Nh.isText(e))return null;var t=Iy.getParentNode(null,e);if(t&&"code"===Iy.getNodeType(t)){var n=Iy.getParentNode(null,t);if(n&&"pre"===Iy.getNodeType(n))return t}return null}(i);if(null==u)return s;var l=u.language,c=void 0===l?"":l;if(!c)return s;var d=function(e,t){if(!t)return[];var n=OB.languages[t];return n?OB.tokenize(e.text,n):[]}(i,c),f=0;try{for(var p=_g(d),h=p.next();!h.done;h=p.next()){var g=h.value,v=f+RB(g);"string"!=typeof g&&s.push(((r={})[g.type]=!0,r.anchor={path:a,offset:f},r.focus={path:a,offset:v},r)),f=v}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}return s};var LB={type:"code",elemToHtml:function(e,t){var n=e.language,r=void 0===n?"":n,o=r?'class="language-'.concat(r,'"'):"";return"<code ".concat(o,">").concat(t,"</code>")}};var MB=function(){function e(){this.title=QE("highLightModule.selectLang"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M64 64v896h896V64H64z m487.6 698.8c0 87.2-51.2 127-125.8 127-67.4 0-106.4-34.8-126.4-77l68.6-41.4c13.2 23.4 25.2 43.2 54.2 43.2 27.6 0 45.2-10.8 45.2-53V475.4h84.2v287.4z m199.2 127c-78.2 0-128.8-37.2-153.4-86l68.6-39.6c18 29.4 41.6 51.2 83 51.2 34.8 0 57.2-17.4 57.2-41.6 0-28.8-22.8-39-61.4-56l-21-9c-60.8-25.8-101-58.4-101-127 0-63.2 48.2-111.2 123.2-111.2 53.6 0 92 18.6 119.6 67.4L800 580c-14.4-25.8-30-36-54.2-36-24.6 0-40.2 15.6-40.2 36 0 25.2 15.6 35.4 51.8 51.2l21 9c71.6 30.6 111.8 62 111.8 132.4 0 75.6-59.6 117.2-139.4 117.2z"></path></svg>',this.tag="select",this.width=95,this.selectPanelWidth=115,this.defaultCodeLang=""}return e.prototype.getOptions=function(e){var t=this,n=[],r=e.getMenuConfig("codeSelectLang").codeLangs,o=void 0===r?[]:r;n.push({text:"plain text",value:""}),o.forEach(function(e){var r=e.text,o=e.value;e.selected&&(t.defaultCodeLang=o),n.push({text:r,value:o})});var i=this.getValue(e);return n.forEach(function(e){e.value===i?e.selected=!0:e.selected=void 0}),n},e.prototype.isActive=function(e){return!1},e.prototype.getValue=function(e){var t=this.getSelectCodeElem(e);if(null==t)return this.defaultCodeLang;if(!kp.isElement(t))return this.defaultCodeLang;var n=t.language.toString(),r=e.getMenuConfig("codeSelectLang").codeLangs;return(void 0===r?[]:r).some(function(e){return e.value===n})?n:this.defaultCodeLang},e.prototype.isDisabled=function(e){return null==e.selection||!this.getSelectCodeElem(e)},e.prototype.exec=function(e,t){if(null!=this.getSelectCodeElem(e)){var n={language:t.toString()};Wh.setNodes(e,n,{match:function(e){return Iy.checkNodeType(e,"code")}})}},e.prototype.getSelectCodeElem=function(e){var t=Iy.getSelectedNodeByType(e,"code");if(null==t)return null;var n=Iy.getParentNode(e,t);return kp.isElement(n)?"pre"!==n.type?null:t:null},e}(),jB={key:"codeSelectLang",factory:function(){return new MB},config:{codeLangs:[{text:"CSS",value:"css"},{text:"HTML",value:"html"},{text:"XML",value:"xml"},{text:"Javascript",value:"javascript"},{text:"Typescript",value:"typescript"},{text:"JSX",value:"jsx"},{text:"Go",value:"go"},{text:"PHP",value:"php"},{text:"C",value:"c"},{text:"Python",value:"python"},{text:"Java",value:"java"},{text:"C++",value:"cpp"},{text:"C#",value:"csharp"},{text:"Visual Basic",value:"visual-basic"},{text:"SQL",value:"sql"},{text:"Ruby",value:"ruby"},{text:"Swift",value:"swift"},{text:"Bash",value:"bash"},{text:"Lua",value:"lua"},{text:"Groovy",value:"groovy"},{text:"Markdown",value:"markdown"},{text:"ABAP",value:"abap"}]}};tm&&(Zv.fn.attr=tm);var HB={renderStyle:function(e,t){var n=e,r=t,o="";return PB.forEach(function(e){n[e]&&(o=e)}),o&&function(e,t){null==e.data&&(e.data={});var n=e.data;null==n.props&&(n.props={}),Object.assign(n.props,{className:t})}(r,o="token ".concat(o)),r},parseStyleHtml:function(e,t,n){var r=Zv(e);if(!kp.isElement(t))return t;if("code"!==Iy.getNodeType(t))return t;var o=t,i=r.attr("class")||"";return 0===i.indexOf("language-")?o.language=i.split("-")[1]||"":o.language=i.toLowerCase(),o},menus:[jB],elemsToHtml:[LB]};YE("en",{listModule:{unOrderedList:"Unordered list",orderedList:"Ordered list"}}),YE("zh-CN",{listModule:{unOrderedList:"无序列表",orderedList:"有序列表"}});var zB=new WeakMap;function $B(e){var t,n=e.children||[],r=n.length;if(0===r)return"";for(var o=0;o<r&&!t;o+=1){var i=n[o];Nh.isText(i)&&(t=i)}return null==t?"":t.color||""}function UB(e,t,n){for(var r=t.type,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(t,["type"]),i=void 0!==n?n:o.level||0,a=Iy.findPath(e,t);;){if(0===a.length||0===a[a.length-1])return null;a=Cp.previous(a);var s=mh.node(e,a);if(!s)return null;var u=Lg(s,1)[0],l=u.level,c=void 0===l?0:l;if(Iy.getNodeType(u)!==r)return null;if(c===i)return u}}function VB(e,t,n){var r=UB(e,t,n);return!!r&&r.ordered===t.ordered}var WB=[];var GB={type:"list-item",elemToHtml:function(e,t){var n="",r="",o=e.ordered,i=void 0!==o&&o?"ol":"ul",a=function(e){var t=zB.get(e);if(null==t)return 0;var n=e,r=n.type,o=n.ordered,i=void 0!==o&&o,a=n.level,s=void 0===a?0:a,u=Iy.findPath(t,e);if(0===u[0])return s+1;var l=Cp.previous(u),c=mh.node(t,l);if(!c)return 0;var d=Lg(c,1)[0];if(Iy.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,h=void 0!==p&&p,g=f.level,v=void 0===g?0:g;return v<s?s-v:v>s?VB(t,e)?0:1:v===s?h===i?0:1:0}(e);if(a>0)for(var s=0;s<a;s+=1)n+="<".concat(i,">"),WB.push(i);var u=function(e){var t=zB.get(e);if(null==t)return 0;var n=e,r=n.type,o=n.ordered,i=void 0!==o&&o,a=n.level,s=void 0===a?0:a,u=Iy.findPath(t,e);if(u[0]===t.children.length-1)return s+1;var l=Cp.next(u),c=mh.node(t,l);if(!c)return 0;var d=Lg(c,1)[0];if(Iy.getNodeType(d)!==r)return s+1;var f=d,p=f.ordered,h=void 0!==p&&p,g=f.level,v=void 0===g?0:g;return v<s?VB(t,d)?s-v:s-v+1:v>s?0:v===s?h===i?0:1:0}(e);if(u>0)for(s=0;s<u;s+=1){var l=WB.pop();r+="</".concat(l,">")}var c=$B(e),d=c?' style="color:'.concat(c,'"'):"";return{html:"<li".concat(d,">").concat(t,"</li>"),prefix:n,suffix:r}}},qB=function(){function e(){this.type="list-item",this.tag="button"}return e.prototype.getListNode=function(e){var t=this.type;return Iy.getSelectedNodeByType(e,t)},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){var t=this.getListNode(e);if(null==t)return!1;var n=t.ordered;return(void 0!==n&&n)===this.ordered},e.prototype.isDisabled=function(e){return null==e.selection||!!Iy.getSelectedElems(e).some(function(t){if(mh.isVoid(e,t)&&mh.isBlock(e,t))return!0;var n=t.type;return!!["pre","code","table"].includes(n)})},e.prototype.exec=function(e,t){this.isActive(e)?Wh.setNodes(e,{type:"paragraph",ordered:void 0,level:void 0}):Wh.setNodes(e,{type:"list-item",ordered:this.ordered,indent:void 0})},e}(),KB=function(e){function t(){var t=e.apply(this,Mg([],Lg(arguments),!1))||this;return t.ordered=!1,t.title=QE("listModule.unOrderedList"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 64h640v128H384V64z m0 384h640v128H384v-128z m0 384h640v128H384v-128zM0 128a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z m0 384a128 128 0 1 1 256 0 128 128 0 0 1-256 0z"></path></svg>',t}return Fg(t,e),t}(qB),YB=function(e){function t(){var t=e.apply(this,Mg([],Lg(arguments),!1))||this;return t.ordered=!0,t.title=QE("listModule.orderedList"),t.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M384 832h640v128H384z m0-384h640v128H384z m0-384h640v128H384zM192 0v256H128V64H64V0zM128 526.016v50.016h128v64H64v-146.016l128-60V384H64v-64h192v146.016zM256 704v320H64v-64h128v-64H64v-64h128v-64H64v-64z"></path></svg>',t}return Fg(t,e),t}(qB),XB={key:"bulletedList",factory:function(){return new KB}},ZB={key:"numberedList",factory:function(){return new YB}};function JB(e){return e.length?e[0].tagName.toLowerCase():""}bm&&(Zv.fn.append=bm),tm&&(Zv.fn.attr=tm),wm&&(Zv.fn.parent=wm);var QB={selector:"li:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Zv(e);0===(t=t.filter(function(e){return!!Nh.isText(e)||!!n.isInline(e)})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var o=function(e){return"ol"===JB(e.parent())}(r),i=function(e){for(var t=0,n=e.parent(),r=JB(n);"ul"===r||"ol"===r;)r=JB(n=n.parent()),t+=1;return t-1}(r);return{type:"list-item",ordered:o,level:i,children:t}}};var eT={selector:"ul:not([data-w-e-type]),ol:not([data-w-e-type])",parseElemHtml:function(e,t,n){return t.flat(1/0)}};function tT(e){return mh.nodes(e,{at:e.selection||void 0,match:function(t){return 1===Iy.findPath(e,t).length}})}var nT={type:"list-item",renderElem:function(e,t,n){zB.set(e,n);var r=e,o=r.level,i=void 0===o?0:o,a=r.ordered,s=void 0!==a&&a,u={margin:"5px 0 5px ".concat(20*i,"px"),display:"flex",alignItems:"flex-start"},l="";if(s){var c=function(e,t){var n=t,r=n.type,o=n.level,i=void 0===o?0:o,a=n.ordered,s=void 0!==a&&a,u=1,l=t,c=Iy.findPath(e,l);if(0===c[0])return 1;for(;c[0]>0;){var d=Cp.previous(c),f=mh.node(e,d);if(null==f)break;var p=f[0],h=p.level,g=void 0===h?0:h,v=p.type,m=p.ordered;if(v!==r)break;if(g<i)break;if(g===i){if(m!==s)break;u+=1}l=p,c=d}return u}(n,e);l="".concat(c,".")}else l=function(e){void 0===e&&(e=0);var t="";switch(e){case 0:t="•";break;case 1:t="◦";break;default:t="▪"}return t}(i);return BC("div",{style:u},BC("span",{contentEditable:!1,style:{marginRight:"0.5em",color:$B(e)},"data-w-e-reserve":!0},l),BC("span",{style:{flex:"1",wordBreak:"break-word"}},t))}},rT={renderElems:[nT],editorPlugin:function(e){var t=e.deleteBackward,n=e.handleTab,r=e.normalizeNode,o=e.insertBreak,i=e;return i.insertBreak=function(){var t=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"list-item")},universal:!0}),1),n=t[0];return n?""!==n[0].children[0].text?o():void Wh.setNodes(i,{type:"paragraph",ordered:void 0,level:void 0}):o()},i.deleteBackward=function(n){var r=i.selection;if(null!=r)if(Bp.isExpanded(r))t(n);else{var o=Iy.getSelectedNodeByType(i,"list-item");if(null!=o)if(0!==r.focus.offset)t(n);else{var a=o,s=a.level,u=void 0===s?0:s,l=a.ordered,c=void 0!==l&&l;if(u>0){var d=UB(e,o,u-1);d&&d.ordered!==c?Wh.setNodes(i,{level:u-1,ordered:!c}):Wh.setNodes(i,{level:u-1})}else Wh.setNodes(i,{type:"paragraph",ordered:void 0,level:void 0})}else t(n)}else t(n)},i.handleTab=function(){var e,t,r,o,a=i.selection;if(null!=a){if(Bp.isCollapsed(a)){var s=Iy.getSelectedNodeByType(i,"list-item");if(null==s)return void n();if(0===a.focus.offset){var u=s.level,l=void 0===u?0:u;return void Wh.setNodes(i,{level:l+1})}}if(Bp.isExpanded(a)){var c=0,d=!1;try{for(var f=_g(tT(i)),p=f.next();!p.done;p=f.next()){var h=Lg(p.value,1)[0];"list-item"===Iy.getNodeType(h)?c+=1:d=!0}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=f.return)&&t.call(f)}finally{if(e)throw e.error}}if(d||c<=1)return void n();try{for(var g=_g(tT(i)),v=g.next();!v.done;v=g.next()){var m=Lg(v.value,2),y=(h=m[0],m[1]),b=h.level;l=void 0===b?0:b;Wh.setNodes(i,{level:l+1},{at:y})}}catch(e){r={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}}else n()}else n()},i.normalizeNode=function(e){var t=Lg(e,2),n=t[0],o=t[1],a=Iy.getNodeType(n);return"bulleted-list"!==a&&"numbered-list"!==a||Wh.unwrapNodes(i,{at:o}),r([n,o])},i},menus:[XB,ZB],elemsToHtml:[GB],parseElemsHtml:[eT,QB]};YE("en",{tableModule:{modal:{border:"Border",borderWidth:"Width",bgColor:"Back color",align:"Text Align",ok:"OK"},color:{default:"Default color",clear:"Clear back color"},borderStyle:{none:"None",solid:"Solid",dotted:"Dotted",dashed:"Dashed",double:"Double",groove:"Groove",ridge:"Ridge",inset:"Inset",outset:"Outset"},deleteCol:"Delete column",deleteRow:"Delete row",deleteTable:"Delete table",widthAuto:"Fit width",insertCol:"Insert column",insertRow:"Insert row",insertTable:"Insert table",header:"Header",mergeCell:"merge cell",splitCell:"split cell",tableProperty:"Table property",cellProperty:"Cell property"}}),YE("zh-CN",{tableModule:{modal:{border:"边框",borderWidth:"宽度",bgColor:"背景色",align:"对齐方式",ok:"确定"},color:{default:"默认颜色",clear:"清除背景色"},borderStyle:{none:"无样式",solid:"实线",dotted:"点状虚线",dashed:"虚线",double:"双线",groove:"凹槽边框",ridge:"菱形边框",inset:"凹边框",outset:"凸边框"},deleteCol:"删除列",deleteRow:"删除行",deleteTable:"删除表格",widthAuto:"适应宽度",insertCol:"插入列",insertRow:"插入行",insertTable:"插入表格",header:"表头",mergeCell:"合并单元格",splitCell:"拆分单元格",tableProperty:"表格属性",cellProperty:"单元格属性"}});var oT={type:"table",elemToHtml:function(e,t){var n=e,r=n.width,o=void 0===r?"auto":r,i=n.columnWidths,a=n.height,s=void 0===a?"auto":a,u=null==i?void 0:i.map(function(e){return"<col width=".concat(e,"></col>")}).join(""),l=u?'<colgroup contentEditable="false">'.concat(u,"</colgroup>"):"";return'<table style="width: '.concat(o,";table-layout: fixed;height:").concat(s,'">').concat(l,"<tbody>").concat(t,"</tbody></table>")}},iT={type:"table-row",elemToHtml:function(e,t){var n=e.height,r=n?' style="height: '.concat(n,'px"'):"";return"<tr".concat(r,">").concat(t,"</tr>")}},aT={type:"table-cell",elemToHtml:function(e,t){var n=e,r=n.colSpan,o=void 0===r?1:r,i=n.rowSpan,a=void 0===i?1:i,s=n.isHeader,u=void 0!==s&&s,l=n.width,c=void 0===l?"auto":l,d=n.hidden;if(void 0!==d&&d)return"";var f=u?"th":"td";return"<".concat(f,' colSpan="').concat(o,'" rowSpan="').concat(a,'" width="').concat(c,'">').concat(t,"</").concat(f,">")}},sT='<svg viewBox="0 0 1024 1024"><path d="M236.8 128L896 787.2V128H236.8z m614.4 704L192 172.8V832h659.2zM192 64h704c38.4 0 64 25.6 64 64v704c0 38.4-25.6 64-64 64H192c-38.4 0-64-25.6-64-64V128c0-38.4 25.6-64 64-64z"></path></svg>',uT={blocks:{td:"table-cell",th:"table-cell",content:"paragraph",tr:"table-row",table:"table",tbody:"table-body"}};function lT(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=uT,o=t.map(function(e){var t;return null===(t=null==r?void 0:r.blocks)||void 0===t?void 0:t[e]});return function(e){return function(e){return!mh.isEditor(e)&&kp.isElement(e)&&"type"in e}(e)&&o.includes(e.type)}}function cT(e,t){for(var n=Lg(t,2),r=n[0],o=n[1],i=[],a=2;a<arguments.length;a++)i[a-2]=arguments[a];var s=Lg(_p.common(e,r,o),2),u=s[0],l=s[1];return!!lT.apply(void 0,Mg([e],Lg(i),!1))(u,l)||!!mh.above(e,{match:lT.apply(void 0,Mg([e],Lg(i),!1)),at:l})}function dT(e,t){var n,r;void 0===t&&(t={});var o=[];try{for(var i=_g(function(e,t){var n,r,o,i,a,s,u,l,c,d,f,p,h,g,v,m,y,b;return void 0===t&&(t={}),Rg(this,function(E){switch(E.label){case 0:if(n=Lg(mh.nodes(e,{match:lT(e,"table"),at:t.at}),1),!(r=n[0]))return[2,[]];o=Lg(r,2),i=o[1],E.label=1;case 1:E.trys.push([1,6,7,8]),a=_g(mh.nodes(e,{match:lT(e,"table"),at:i})),s=a.next(),E.label=2;case 2:if(s.done)return[3,5];u=Lg(s.value,2),l=u[1],c=[];try{for(y=void 0,d=_g(mh.nodes(e,{match:lT(e,"tr"),at:l})),f=d.next();!f.done;f=d.next())p=Lg(f.value,2),h=p[1],c.push(Mg([],Lg(mh.nodes(e,{match:lT(e,"th","td"),at:h})),!1))}catch(e){y={error:e}}finally{try{f&&!f.done&&(b=d.return)&&b.call(d)}finally{if(y)throw y.error}}return[4,c];case 3:E.sent(),E.label=4;case 4:return s=a.next(),[3,2];case 5:return[3,8];case 6:return g=E.sent(),v={error:g},[3,8];case 7:try{s&&!s.done&&(m=a.return)&&m.call(a)}finally{if(v)throw v.error}return[7];case 8:return[2]}})}(e,{at:t.at})),a=i.next();!a.done;a=i.next()){for(var s=a.value,u=[],l=0,c=0;c<s.length;c+=1)s[c]&&(l=Math.max(l,s[c].length));for(c=0;c<s.length;c+=1)if(u[c]||(u[c]=[]),s[c])for(var d=0;d<s[c].length;d+=1)if(s[c][d]&&s[c][d][0]){for(var f=Lg(s[c][d],1)[0],p=f.rowSpan,h=void 0===p?1:p,g=f.colSpan,v=void 0===g?1:g,m=d;u[c]&&u[c][m];)m+=1;for(var y=0;y<v;y+=1)for(var b=0;b<h;b+=1){var E=c+b,w=m+y;u[E]||(u[E]=[]),u[E][w]||(u[E][w]=[s[c][d],{rtl:y+1,ltr:v-y,ttb:b+1,btt:h-b}])}}o.push.apply(o,Mg([],Lg(u),!1))}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return o}var fT=function(){function e(e,t){this.x=e,this.y=t}return e.valueOf=function(e,t){return new this(e,t)},e.equals=function(e,t){return e.x===t.x&&e.y===t.y},e}();function pT(e){return e.length?e[0].tagName.toLowerCase():""}function hT(e,t){for(var n="",r=(e.attr("style")||"").split(";"),o=r.length,i=0;i<o;i+=1){var a=r[i];if(a){var s=a.split(":");s[0].trim()===t&&(n=s[1].trim())}}return n}bm&&Zv.fn&&(Zv.fn.append=bm),am&&Zv.fn&&(Zv.fn.on=am),Tm&&Zv.fn&&(Zv.fn.focus=Tm),tm&&Zv.fn&&(Zv.fn.attr=tm),im&&Zv.fn&&(Zv.fn.val=im),vm&&Zv.fn&&(Zv.fn.html=vm),om&&Zv.fn&&(Zv.fn.dataset=om),Jv&&Zv.fn&&(Zv.fn.addClass=Jv),Qv&&Zv.fn&&(Zv.fn.removeClass=Qv),Am&&Zv.fn&&(Zv.fn.children=Am),hm&&Zv.fn&&(Zv.fn.each=hm),Dm&&Zv.fn&&(Zv.fn.find=Dm),rm&&Zv.fn&&(Zv.fn.data=rm),dm&&Zv.fn&&(Zv.fn.hide=dm),fm&&Zv.fn&&(Zv.fn.show=fm);var gT=new WeakMap,vT=new WeakMap,mT=function(){function e(){this.title=QE("tableModule.tableProperty"),this.iconSvg='<svg viewBox="0 0 20 20"><path d="M8 2v5h4V2h1v5h5v1h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5H7v-5H2v-1h5V8H2V7h5V2h1zm4 6H8v4h4V8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM17 1a2 2 0 0 1 2 2v9.475l-.85-.124-.857-1.736a2.048 2.048 0 0 0-.292-.44L17 3H3v14h7.808l.402.392L10.935 19H3a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h14z"/></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.menu="table",this.borderStyle=[{value:"none",label:QE("tableModule.borderStyle.none")},{value:"solid",label:QE("tableModule.borderStyle.solid")},{value:"dotted",label:QE("tableModule.borderStyle.dotted")},{value:"dashed",label:QE("tableModule.borderStyle.dashed")},{value:"double",label:QE("tableModule.borderStyle.double")},{value:"groove",label:QE("tableModule.borderStyle.groove")},{value:"ridge",label:QE("tableModule.borderStyle.ridge")},{value:"inset",label:QE("tableModule.borderStyle.inset")},{value:"outset",label:QE("tableModule.borderStyle.outset")}],this.textAlignOptions=[{value:"left",label:QE("justify.left"),svg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"center",label:QE("justify.center"),svg:'<svg viewBox="0 0 1024 1024"><path d="M870.4 793.6v102.4H153.6v-102.4h716.8z m102.4-230.4v102.4H51.2v-102.4h921.6z m-102.4-230.4v102.4H153.6v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"right",label:QE("justify.right"),svg:'<svg viewBox="0 0 1024 1024"><path d="M972.8 793.6v102.4H256v-102.4h716.8z m0-230.4v102.4H51.2v-102.4h921.6z m0-230.4v102.4H256v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>'},{value:"justify",label:QE("justify.justify"),svg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z m0 192h1024v128H0z"></path></svg>'}]}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==Iy.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){},e.prototype.getModalContentNode=function(e){return Lg(mh.nodes(e,{match:lT(e,"table")}),1)[0]},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this.getModalContentNode(e);if(!n)return null;var r=Lg(n,2),o=r[0],i=r[1],a=Zv('<div>\n <label class="babel-container">\n <span>'.concat(QE("tableModule.modal.border"),'</span>\n <span class="babel-container-border">\n <select name="borderStyle">\n ').concat(this.borderStyle.map(function(e){return'<option value="'.concat(e.value,'">').concat(e.label,"</option>")}).join(""),'\n </select>\n <span class="color-group" data-mark="color">\n <span class="color-group-block"></span>\n <input name="borderColor" type="hidden">\n </span>\n <input name="borderWidth" type="number" placeholder="').concat(QE("tableModule.modal.borderWidth"),'">\n </span>\n </label>\n <div class="babel-container">\n <span>').concat(QE("tableModule.modal.bgColor"),'</span>\n <span class="babel-container-background">\n <span class="color-group" data-mark="bgColor">\n <span class="color-group-block"></span>\n <input name="backgroundColor" type="hidden">\n </span>\n </span>\n </div>\n <label class="babel-container">\n <span>').concat(QE("tableModule.modal.align"),'</span>\n <span class="babel-container-align">\n <select name="textAlign">\n ').concat(this.textAlignOptions.map(function(e){return'<option value="'.concat(e.value,'">').concat(e.label,"</option>")}).join(""),'\n </select>\n </span>\n </label>\n <div class="button-container">\n <button type="button">').concat(QE("tableModule.modal.ok"),"</button>\n </div>\n </div>"));a.find("[name]").each(function(e){Zv(e).val(o[Zv(e).attr("name")])});var s=function(e,t){t?Zv(".color-group-block",e).css("background-color",t).empty():Zv(".color-group-block",e).css("background-color","").html(sT)};return a.find(".color-group").each(function(n){var r=Zv('[type="hidden"]',n).val()||"";s(n,r);var o=Zv(n);o.on("click",function(){a.find(".color-group .w-e-drop-panel").hide();var i=o.data("panel");i?i.show():(i=t.getPanelContentElem(e,{mark:o.data("mark"),selectedColor:r,callback:function(e){Zv('[type="hidden"]',n).val(e||""),s(n,e),i.hide()}}),o.append(i),o.data("panel",i))})}),a.find("button").on("click",function(){var n=Array.from(a.find("[name]")).reduce(function(e,t){return e[Zv(t).attr("name")]=Zv(t).val(),e},{}),r=gT.get(e);"cell"===t.menu&&(null==r?void 0:r.length)?r.forEach(function(t){t.forEach(function(t){Wh.setNodes(e,n,{at:t[0][1]})})}):Wh.setNodes(e,n,{at:i}),setTimeout(function(){e.focus()})}),a[0]},e.prototype.getPanelContentElem=function(e,t){var n=t.mark,r=t.selectedColor,o=t.callback,i=Zv('<ul class="w-e-panel-content-color"></ul>');i.on("click","li",function(e){var t=e.target;if(t){e.preventDefault(),e.stopPropagation();var n=Zv(t).attr("data-value");o(n)}});var a=e.getMenuConfig(n).colors;(void 0===a?[]:a).forEach(function(e){var t=Zv('<div class="color-block" data-value="'.concat(e,'"></div>'));t.css("background-color",e);var n=Zv('<li data-value="'.concat(e,'"></li>'));r===e&&n.addClass("active"),n.append(t),i.append(n)});var s="";"color"===n&&(s=QE("tableModule.color.default")),"bgColor"===n&&(s=QE("tableModule.color.clear"));var u=Zv('\n <li data-value="" class="clear">\n '.concat(sT,"\n ").concat(s,"\n </li>\n "));i.prepend(u);var l=Zv('<div class="w-e-drop-panel"></div>');return l.append(i),l},e}(),yT=function(e){function t(){var t=e.apply(this,Mg([],Lg(arguments),!1))||this;return t.title=QE("tableModule.cellProperty"),t.iconSvg='<svg viewBox="0 0 20 20"><path d="m11.105 18-.17 1H2.5A1.5 1.5 0 0 1 1 17.5v-15A1.5 1.5 0 0 1 2.5 1h15A1.5 1.5 0 0 1 19 2.5v9.975l-.85-.124-.15-.302V8h-5v4h.021l-.172.351-1.916.28-.151.027c-.287.063-.54.182-.755.341L8 13v5h3.105zM2 12h5V8H2v4zm10-4H8v4h4V8zM2 2v5h5V2H2zm0 16h5v-5H2v5zM13 7h5V2h-5v5zM8 2v5h4V2H8z" opacity=".6"/><path d="m15.5 11.5 1.323 2.68 2.957.43-2.14 2.085.505 2.946L15.5 18.25l-2.645 1.39.505-2.945-2.14-2.086 2.957-.43L15.5 11.5zM13 6a1 1 0 0 1 1 1v3.172a2.047 2.047 0 0 0-.293.443l-.858 1.736-1.916.28-.151.027A1.976 1.976 0 0 0 9.315 14H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h6zm-1 2H8v4h4V8z"/></svg>',t.tag="button",t.showModal=!0,t.modalWidth=300,t.menu="cell",t}return Fg(t,e),t.prototype.getModalContentNode=function(e){return Lg(mh.nodes(e,{match:lT(e,"td")}),1)[0]},t}(mT),bT=function(){function e(){this.title=QE("tableModule.deleteCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 510.976L393.216 445.44v-13.1072L327.68 366.7968V510.976z m327.68-78.4384l65.536-65.536V507.904L655.36 442.368v-9.8304z m393.216 484.9664V0H0v917.504h1048.576z m-65.536-131.072h-262.144v-52.4288l-13.1072 13.1072-52.4288-52.4288v91.7504H393.216v-91.7504l-52.4288 52.4288-13.1072-13.1072v52.4288H65.536V65.536H327.68v121.2416l36.0448-36.0448 29.4912 29.4912V62.2592h262.144V180.224l49.152-49.152 16.384 16.384V62.2592h262.144V786.432z m-294.912-108.1344l-160.5632-160.5632-167.1168 167.1168-78.6432-78.6432 167.1168-167.1168L288.3584 278.528l78.6432-78.6432 160.5632 160.5632 163.84-163.84 78.6432 78.6432-163.84 163.84 160.5632 160.5632-78.6432 78.6432z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Bp.isCollapsed(t)||null==Iy.getSelectedNodeByType(e,"table-cell"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")},universal:!0}),1),r=Lg(n[0],2),o=r[0],i=r[1],a=Iy.getParentNode(e,o),s=(null==a?void 0:a.children.length)||0;if(!a||s<=1)Wh.removeNodes(e,{mode:"highest"});else if(null!=Iy.getParentNode(e,a)){var u=dT(e),l=0;e:for(var c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=Lg(u[c][d],1),p=Lg(f[0],2)[1];if(Cp.equals(i,p)){l=d;break e}}mh.withoutNormalizing(e,function(){for(var t,n,r=new Set,o=new Set,i=0;i<u.length;i+=1)if(u[i]&&u[i][l]){var a=Lg(u[i][l],2),s=Lg(a[0],2)[1],c=a[1],d=c.rtl,f=c.ltr,p=c.ttb,h=c.btt,g=s.join(",");if(d>1||f>1||p>1||h>1){var v=i-(p-1),m=l-(d-1);if(v<0||v>=u.length||!u[v]||!u[v][m])continue;var y=Lg(u[v][m],1),b=Lg(y[0],2),E=b[0],w=b[1],C=w.join(",");if(!o.has(C)){o.add(C);var D=E.rowSpan,A=void 0===D?1:D,S=E.colSpan,O=void 0===S?1:S,x=Math.max(O-1,1);Wh.setNodes(e,{rowSpan:A,colSpan:x},{at:w})}}else r.add(g)}var N=Array.from(r);N.sort(function(e,t){var n=e.split(",").map(Number),r=t.split(",").map(Number);return n[n.length-2]!==r[r.length-2]?r[r.length-2]-n[n.length-2]:r[r.length-1]-n[n.length-1]});try{for(var B=_g(N),T=B.next();!T.done;T=B.next()){var k=T.value.split(",").map(Number);try{mh.hasPath(e,k)&&Wh.removeNodes(e,{at:k})}catch(e){console.warn("删除单元格失败:",k,e)}}}catch(e){t={error:e}}finally{try{T&&!T.done&&(n=B.return)&&n.call(B)}finally{if(t)throw t.error}}var F=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table")},universal:!0}),1),I=F[0];if(I){var P=Lg(I,2),R=P[0],_=P[1],L=R.columnWidths,M=Mg([],Lg(void 0===L?[]:L),!1);M.splice(l,1),Wh.setNodes(e,{columnWidths:M},{at:_})}})}}},e}(),ET=function(){function e(){this.title=QE("tableModule.deleteRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M907.6736 586.5472L747.1104 425.984l163.84-163.84-78.6432-78.6432-163.84 163.84L507.904 186.7776 429.2608 262.144l163.84 163.84-167.1168 167.1168 78.6432 78.6432 167.1168-167.1168 160.5632 160.5632 75.3664-78.6432zM0 917.504V0h1048.576v917.504H0z m983.04-327.68h-22.9376l-65.536-65.536H983.04V327.68h-91.7504l65.536-65.536h26.2144V65.536H65.536v196.608h317.8496l65.536 65.536H65.536v196.608h380.1088l-65.536 65.536H65.536v196.608H983.04v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Bp.isCollapsed(t)||null==Iy.getSelectedNodeByType(e,"table-row"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-row")},universal:!0}),1),r=Lg(n[0],2),o=r[0],i=r[1],a=Iy.getParentNode(e,o);if(((null==a?void 0:a.children.length)||0)<=1)Wh.removeNodes(e,{mode:"highest"});else{var s=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")},universal:!0}),1),u=Lg(s[0],2)[1],l=dT(e),c=0;e:for(var d=0;d<l.length;d+=1)for(var f=0;f<l[d].length;f+=1){var p=Lg(l[d][f],1),h=Lg(p[0],2)[1];if(Cp.equals(u,h)){c=d;break e}}mh.withoutNormalizing(e,function(){for(var t,n,r=[],o=0;o<l[c].length;o+=1){var a=Lg(l[c][o],2),s=Lg(a[0],1)[0].hidden,u=a[1],d=u.ttb,f=u.btt,p=u.rtl;if(d>1||f>1){var h=c-(d-1);if(h<0||h>=l.length||!l[h]||!l[h][o])continue;var g=Lg(l[h][o],1),v=Lg(g[0],2),m=v[0],y=v[1],b=m,E=b.rowSpan,w=void 0===E?1:E,C=b.colSpan,D=void 0===C?1:C;if(s)Wh.setNodes(e,{rowSpan:Math.max(w-1,1),colSpan:D},{at:y});else if(1===d&&1===p){if(c+1<l.length&&w>1){var A={type:"table-cell",rowSpan:w-1,colSpan:D,hidden:!1,children:b.children.map(function(e){return Ig({},e)})};b.isHeader&&(A.isHeader=b.isHeader),b.width&&(A.width=b.width),b.backgroundColor&&(A.backgroundColor=b.backgroundColor),b.borderWidth&&(A.borderWidth=b.borderWidth),b.borderStyle&&(A.borderStyle=b.borderStyle),b.borderColor&&(A.borderColor=b.borderColor),b.textAlign&&(A.textAlign=b.textAlign),r.push({cell:A,columnIndex:o})}else Wh.setNodes(e,{rowSpan:Math.max(w-1,1),colSpan:D},{at:y})}else Wh.setNodes(e,{rowSpan:Math.max(w-1,1),colSpan:D},{at:y})}}if(Wh.removeNodes(e,{at:i}),r.length>0){var S=i;try{r.sort(function(e,t){return e.columnIndex-t.columnIndex});try{for(var O=_g(r),x=O.next();!x.done;x=O.next()){var N=x.value,B=N.cell,T=N.columnIndex;try{var k=Mg(Mg([],Lg(S),!1),[T],!1);Wh.insertNodes(e,B,{at:k})}catch(t){try{var F=Lg(mh.node(e,S),1)[0].children.length,I=Mg(Mg([],Lg(S),!1),[F],!1);Wh.insertNodes(e,B,{at:I})}catch(e){console.warn("插入新单元格失败:",e)}}}}catch(e){t={error:e}}finally{try{x&&!x.done&&(n=O.return)&&n.call(O)}finally{if(t)throw t.error}}}catch(e){console.warn("插入新单元格失败:",e)}}})}}},e}(),wT=function(){function e(){this.title=QE("tableModule.deleteTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M826.8032 356.5312c-19.328 0-36.3776 15.6928-36.3776 35.0464v524.2624c0 19.328-16 34.56-35.328 34.56H264.9344c-19.328 0-35.5072-15.3088-35.5072-34.56V390.0416c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.6928-33.5104 35.0464V915.712c0 57.9328 44.6208 108.288 102.528 108.288H755.2c57.9328 0 108.0832-50.4576 108.0832-108.288V391.4752c-0.1024-19.2512-17.1264-34.944-36.48-34.944z" p-id="9577"></path><path d="M437.1712 775.7568V390.6048c0-19.328-14.1568-35.0464-33.5104-35.0464s-33.5104 15.616-33.5104 35.0464v385.152c0 19.328 14.1568 35.0464 33.5104 35.0464s33.5104-15.7184 33.5104-35.0464zM649.7024 775.7568V390.6048c0-19.328-17.0496-35.0464-36.3776-35.0464s-36.3776 15.616-36.3776 35.0464v385.152c0 19.328 17.0496 35.0464 36.3776 35.0464s36.3776-15.7184 36.3776-35.0464zM965.0432 217.0368h-174.6176V145.5104c0-57.9328-47.2064-101.76-104.6528-101.76h-350.976c-57.8304 0-105.3952 43.8528-105.3952 101.76v71.5264H54.784c-19.4304 0-35.0464 14.1568-35.0464 33.5104 0 19.328 15.616 33.5104 35.0464 33.5104h910.3616c19.328 0 35.0464-14.1568 35.0464-33.5104 0-19.3536-15.6928-33.5104-35.1488-33.5104z m-247.3728 0H297.3952V145.5104c0-19.328 18.2016-34.7648 37.4272-34.7648h350.976c19.1488 0 31.872 15.1296 31.872 34.7648v71.5264z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return null==e.selection||null==Iy.getSelectedNodeByType(e,"table")},e.prototype.exec=function(e,t){this.isDisabled(e)||Wh.removeNodes(e,{mode:"highest"})},e}(),CT=function(){function e(){this.title=QE("tableModule.widthAuto"),this.iconSvg='<svg viewBox="0 0 1228 1024"><path d="M862.514337 563.200461H404.581995v121.753478a13.311987 13.311987 0 0 1-6.655993 11.468789 10.23999 10.23999 0 0 1-12.083188-1.433599l-204.799795-179.199821a13.721586 13.721586 0 0 1 0-20.479979l204.799795-179.302221a10.23999 10.23999 0 0 1 12.185588-1.535998 13.209587 13.209587 0 0 1 6.553593 11.673588v115.097485h457.932342V319.693504a11.571188 11.571188 0 0 1 18.841582-10.239989l204.799795 179.19982a13.721586 13.721586 0 0 1 0 20.47998l-204.799795 179.199821a10.23999 10.23999 0 0 1-12.185588 1.535998 13.311987 13.311987 0 0 1-6.655994-11.571188V563.200461zM136.499064 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785H15.155185A15.155185 15.155185 0 0 1 0 1008.844815V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086294a15.155185 15.155185 0 0 1 15.257585 15.155185zM1228.798771 14.951409v993.893406a15.257585 15.257585 0 0 1-15.155185 15.052785h-106.188693a15.155185 15.155185 0 0 1-15.155185-15.052785V14.951409a15.257585 15.257585 0 0 1 15.155185-15.052785h106.086293A15.155185 15.155185 0 0 1 1228.798771 15.053809z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return!1},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Bp.isCollapsed(t)||null==Iy.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Iy.getSelectedNodeByType(e,"table");if(n){var r=n.columnWidths,o=void 0===r?[]:r,i=Iy.toDOMNode(e,n).querySelector(".table-container");if(i&&0!==o.length){var a=i.clientWidth,s=o.reduce(function(e,t){return e+t},0),u=o.map(function(e){var t=e/s;return Math.floor(t*a)}),l=e.getMenuConfig("insertTable").minWidth,c=parseInt(String(void 0===l?60:l),10)||60,d=u.map(function(e){return Math.max(c,e)}),f=d.reduce(function(e,t){return e+t},0);if(f>a){var p=a/f,h=d.map(function(e){return Math.max(c,Math.floor(e*p))});v={width:"auto",columnWidths:h};Wh.setNodes(e,v,{mode:"highest"})}else{h=Mg([],Lg(d),!1);var g=a-f-1;g>0&&h.length>0&&(h[h.length-1]+=g);v={width:"auto",columnWidths:h};Wh.setNodes(e,v,{mode:"highest"})}}else{var v={width:"auto"};Wh.setNodes(e,v,{mode:"highest"})}}}},e}();function DT(e){var t=e.children||[];return 0===t.length?[]:(t[0]||{}).children||[]}function AT(e){return DT(e).every(function(e){return!!e.isHeader})}var ST=function(){function e(){this.title=QE("tableModule.insertCol"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M327.68 193.3312v186.7776H140.9024v91.7504H327.68v186.7776h88.4736V471.8592h190.0544V380.1088H416.1536V193.3312zM0 917.504V0h1048.576v917.504H0zM655.36 65.536H65.536v720.896H655.36V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 262.144h-262.144v196.608h262.144V327.68z m0 262.144h-262.144v196.608h262.144v-196.608z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;if(null==t)return!0;if(!Bp.isCollapsed(t))return!0;var n=Iy.getSelectedNodeByType(e,"table");if(null==n)return!0;try{var r=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")},universal:!0}),1),o=r[0];if(!o)return!0;for(var i=Lg(o,2)[1],a=dT(e),s=-1,u=0;u<a.length;u+=1){for(var l=0;l<a[u].length;l+=1){var c=Lg(a[u][l],1),d=Lg(c[0],2)[1];if(Cp.equals(i,d)){s=l;break}}if(-1!==s)break}if(-1===s)return!0;var f=n.columnWidths,p=(void 0===f?[]:f)[s];if(p&&p<20)return!0}catch(e){return!0}return!1},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")},universal:!0}),1),r=Lg(n[0],2),o=r[0],i=r[1],a=Iy.getParentNode(e,o);if(null!=a){var s=Iy.getParentNode(e,a);if(null!=s){for(var u=dT(e),l=0,c=0;c<u.length;c+=1)for(var d=0;d<u[c].length;d+=1){var f=Lg(u[c][d],1),p=Lg(f[0],2)[1];if(Cp.equals(i,p)){l=d;break}}mh.withoutNormalizing(e,function(){for(var t=new Set,n=new Set,r=0;r<u.length;r+=1)if(u[r]&&u[r][l]){var o=Lg(u[r][l],2);Lg(o[0],1);var i=o[1],a=i.rtl,c=i.ltr,d=i.ttb,f=i.btt;if(a>1||c>1||d>1||f>1){var p=r-(d-1),h=l-(a-1);if(p<0||p>=u.length||!u[p]||!u[p][h])continue;var g=Lg(u[p][h],1),v=Lg(g[0],2),m=v[0],y=v[1],b=y.join(",");if(t.has(b))n.add(r);else{t.add(b);var E=m.rowSpan,w=void 0===E?1:E,C=m.colSpan,D=(void 0===C?1:C)+1;m.hidden||Wh.setNodes(e,{colSpan:D},{at:y});for(var A=0;A<w;A+=1)n.add(p+A)}}}for(r=0;r<u.length;r+=1)if(!n.has(r)&&u[r]&&u[r][l]){var S={type:"table-cell",children:[{text:""}]};0===r&&AT(s)&&(S.isHeader=!0);var O=Lg(u[r][l],1),x=Lg(O[0],2)[1];Wh.insertNodes(e,S,{at:x})}var N=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table")},universal:!0}),1),B=N[0];if(B){var T=Lg(B,2),k=T[0],F=T[1],I=k.columnWidths,P=void 0===I?[]:I,R=Mg([],Lg(P),!1),_=e.getMenuConfig("insertTable").minWidth,L=void 0===_?60:_,M=P[l]||parseInt(L,10)||60,j=Math.floor(M/2),H=M-j;R.splice(l,0,j),R[l+1]=H,Wh.setNodes(e,{columnWidths:R},{at:F})}})}}}},e}(),OT=function(){function e(){this.title=QE("tableModule.insertRow"),this.iconSvg='<svg viewBox="0 0 1048 1024"><path d="M707.7888 521.0112h-147.456v-147.456H488.2432v147.456h-147.456v68.8128h147.456v147.456h72.0896v-147.456h147.456zM0 917.504V0h1048.576v917.504H0zM327.68 65.536H65.536v196.608H327.68V65.536z m327.68 0H393.216v196.608h262.144V65.536z m327.68 0h-262.144v196.608h262.144V65.536z m0 258.8672H65.536v462.0288H983.04V324.4032z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Bp.isCollapsed(t)||null==Iy.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){var n;if(!this.isDisabled(e)){var r=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")},universal:!0}),1),o=Lg(r[0],2)[1],i=dT(e),a=0;e:for(var s=0;s<i.length;s+=1)for(var u=0;u<i[s].length;u+=1){var l=Lg(i[s][u],1),c=Lg(l[0],2)[1];if(Cp.equals(o,c)){a=s;break e}}var d=(null===(n=i[a])||void 0===n?void 0:n.length)||0;0!==d&&mh.withoutNormalizing(e,function(){for(var t=a+1,n=t>=0&&t<i.length,r=[],s=0;n&&s<i[a].length;s+=1){var u=Lg(i[a][s],2)[1],l=u.ttb,c=u.btt;if(l>1||c>1){var f=a-(l-1);if(f<0||f>=i.length||!i[f]||!i[f][s])continue;var p=Lg(i[f][s],1),h=Lg(p[0],2),g=h[0],v=h[1],m=g.rowSpan||1;r.push(s),g.hidden||Wh.setNodes(e,{rowSpan:m+1},{at:v})}}for(var y=(e.getMenuConfig("insertTable")||{}).minRowHeight,b={type:"table-row",children:[],height:parseInt((void 0===y?30:y).toString(),10)||30},E=0;E<d;E+=1)if(!r.includes(E)){b.children.push({type:"table-cell",children:[{text:""}]})}var w=Cp.parent(o),C=Cp.next(w);Wh.insertNodes(e,b,{at:C})})}},e}();var xT=function(){function e(){this.title=QE("tableModule.insertTable"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M0 64v896h1024V64H0z m384 576v-192h256v192h-256z m256 64v192h-256v-192h256z m0-512v192h-256V192h256zM320 192v192H64V192h256z m-256 256h256v192H64v-192z m640 0h256v192h-256v-192z m0-64V192h256v192h-256zM64 704h256v192H64v-192z m640 192v-192h256v192h-256z"></path></svg>',this.tag="button",this.showDropPanel=!0,this.$content=null}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Bp.isCollapsed(t)||!!Iy.getSelectedElems(e).some(function(t){var n=Iy.getNodeType(t);return"pre"===n||("table"===n||("list-item"===n||!!e.isVoid(t)))}))},e.prototype.getPanelContentElem=function(e){var t=this;if(this.$content)return this.$content[0];for(var n=Zv('<div class="w-e-panel-content-table"></div>'),r=Zv("<span>0 × 0</span>"),o=Zv("<table></table>"),i=0;i<10;i+=1){for(var a=Zv("<tr></tr>"),s=0;s<10;s+=1){var u=Zv("<td></td>");u.attr("data-x",s.toString()),u.attr("data-y",i.toString()),a.append(u),u.on("mouseenter",function(e){var t=e.target;if(null!=t){var n=Zv(t).dataset(),i=n.x,a=n.y;r[0].innerHTML="".concat(i+1," × ").concat(a+1),o.children().each(function(e){Zv(e).children().each(function(e){var t=Zv(e),n=t.dataset(),r=n.x,o=n.y;r<=i&&o<=a?t.addClass("active"):t.removeClass("active")})})}}),u.on("click",function(n){n.preventDefault();var r=n.target;if(null!=r){var o=Zv(r).dataset(),i=o.x,a=o.y;t.insertTable(e,a+1,i+1)}})}o.append(a)}return n.append(o),n.append(r),this.$content=n,n[0]},e.prototype.insertTable=function(e,t,n){var r=parseInt(t,10),o=parseInt(n,10);if(r&&o&&!(r<=0||o<=0)){if(Iy.isSelectedEmptyParagraph(e)&&Wh.removeNodes(e,{mode:"highest"}),0===e.children.length){Wh.insertNodes(e,{type:"paragraph",children:[{text:""}]},{mode:"highest"})}var i=function(e,t,n){for(var r,o=[],i=e.getMenuConfig("insertTable"),a=i.minWidth,s=void 0===a?60:a,u=i.minRowHeight,l=void 0===u?30:u,c=i.tableFullWidth,d=i.tableHeader,f=Array(n).fill(parseInt(s,10)||60),p=0;p<t;p+=1){for(var h=[],g=0;g<n;g+=1){var v={type:"table-cell",children:[{text:""}]};0===p&&(v.isHeader=null===(r=null==d?void 0:d.selected)||void 0===r||r),h.push(v)}o.push({type:"table-row",children:h,height:parseInt(l,10)||30})}return{type:"table",width:(null==c?void 0:c.selected)?"100%":"auto",children:o,columnWidths:f}}(e,r,o);Wh.insertNodes(e,i,{mode:"highest"})}},e}(),NT={isInTable:function(e,t){return void 0===t&&(t={}),!!Lg(mh.nodes(e,{match:lT(e,"table"),at:t.at}),1)[0]},selection:function(e){var t,n,r,o,i,a,s,u;return Rg(this,function(l){switch(l.label){case 0:t=gT.get(e),n=0,l.label=1;case 1:if(!(t&&n<t.length))return[3,4];for(r=[],o=0;o<t[n].length;o+=1)i=Lg(t[n][o],2),a=i[0],s=i[1],u=s.ltr,1===s.ttb&&r.push(a),o+=u-1;return[4,r];case 2:l.sent(),l.label=3;case 3:return n+=1,[3,1];case 4:return[2]}})},unselect:function(e){vT.delete(e),gT.delete(e)},isSelected:function(e,t){var n=vT.get(e);return!!n&&n.has(t)},hasSelected:function(e){return gT.has(e)}},BT=function(){function e(){this.title=QE("tableModule.mergeCell"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M482.2 508.4 331.3 389c-3-2.4-7.3-.2-7.3 3.6V478H184V184h204v128c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V144c0-15.5-12.5-28-28-28H144c-15.5 0-28 12.5-28 28v736c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v128H184V546h140v85.4c0 3.8 4.4 6 7.3 3.6l150.9-119.4c2.4-1.8 2.4-5.4 0-7.2zM880 116H596c-15.5 0-28 12.5-28 28v168c0 2.2 1.8 4 4 4h60c2.2 0 4-1.8 4-4V184h204v294H700v-85.4c0-3.8-4.3-6-7.3-3.6l-151 119.4c-2.3 1.8-2.3 5.3 0 7.1l151 119.5c2.9 2.3 7.3.2 7.3-3.6V546h140v294H636V712c0-2.2-1.8-4-4-4h-60c-2.2 0-4 1.8-4 4v168c0 15.5 12.5 28 28 28h284c15.5 0 28-12.5 28-28V144c0-15.5-12.5-28-28-28z"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return!this.canMerge(e)},e.prototype.exec=function(e,t){this.isDisabled(e)||(this.merge(e),NT.unselect(e))},e.prototype.canMerge=function(e){var t=gT.get(e);if(!t||!t.length)return!1;var n=Lg(t[t.length-1][t[t.length-1].length-1],1),r=Lg(n[0],2)[1],o=Lg(t[0][0],1);return!!cT(e,[Lg(o[0],2)[1],r],"table")},e.prototype.merge=function(e){if(this.canMerge(e)){var t=gT.get(e);if(t&&t.length){var n=Lg(t[0][0],1),r=Lg(n[0],2)[1],o=Lg(_p.children(e,r,{reverse:!0}),1),i=Lg(o[0],2)[1];mh.withoutNormalizing(e,function(){for(var n,o,a,s,u,l,c=new Map,d=[],f=1/0,p=-1/0,h=1/0,g=-1/0,v=0;v<t.length;v+=1)for(var m=0;m<t[v].length;m+=1){var y=Lg(t[v][m],2),b=Lg(y[0],2),E=b[0],w=b[1],C=y[1].ttb,D=w.join(",");if(1===C&&!c.has(D)){c.set(D,{path:w,x:v,y:m,element:E});var A=E.rowSpan,S=void 0===A?1:A,O=E.colSpan,x=v,N=v+S-1,B=m,T=m+(void 0===O?1:O)-1;f=Math.min(f,x),p=Math.max(p,N),h=Math.min(h,B),g=Math.max(g,T)}}var k=p-f+1,F=g-h+1;try{for(var I=_g(c),P=I.next();!P.done;P=I.next()){w=Lg(P.value,2)[1].path;Cp.equals(r,w)||d.push(w)}}catch(e){n={error:e}}finally{try{P&&!P.done&&(o=I.return)&&o.call(I)}finally{if(n)throw n.error}}d.sort(function(e,t){for(var n=0;n<Math.min(e.length,t.length);n+=1)if(e[n]!==t[n])return t[n]-e[n];return t.length-e.length});try{for(var R=_g(d),_=R.next();!_.done;_=R.next()){w=_.value;try{if(!mh.hasPath(e,w))continue;try{for(var L=(u=void 0,_g(_p.children(e,w,{reverse:!0}))),M=L.next();!M.done;M=L.next()){var j=Lg(M.value,2)[1];Wh.moveNodes(e,{to:Cp.next(i),at:j})}}catch(e){u={error:e}}finally{try{M&&!M.done&&(l=L.return)&&l.call(L)}finally{if(u)throw u.error}}Wh.removeNodes(e,{at:w})}catch(e){}}}catch(e){a={error:e}}finally{try{_&&!_.done&&(s=R.return)&&s.call(R)}finally{if(a)throw a.error}}Wh.setNodes(e,{rowSpan:k,colSpan:F},{at:r})})}}},e}(),TT=function(){function e(){this.title=QE("tableModule.splitCell"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M362.667 494.933v53.334l25.6-25.6zm0-241.066L460.8 352V78.933H57.6v98.134h305.067zm0 535.466v57.6H57.6v98.134h403.2V691.2zM661.333 494.933v53.334l-25.6-25.6zm0-241.066L563.2 352V78.933h403.2v98.134H661.333zm0 535.466v57.6H966.4v98.134H563.2V691.2z"/><path d="M753.067 341.333 693.333 281.6 512 460.8 330.667 281.6l-59.734 59.733 181.334 181.334L270.933 704l59.734 59.733L512 582.4l181.333 181.333L753.067 704 571.733 522.667z"/></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){var t=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")}}),1),n=t[0];if(!n)return!0;var r=Lg(n,1)[0],o=r.rowSpan,i=void 0===o?1:o,a=r.colSpan;return!(i>1||(void 0===a?1:a)>1)},e.prototype.exec=function(e,t){this.isDisabled(e)||this.split(e)},e.prototype.split=function(e,t){void 0===t&&(t={});var n=Lg(mh.nodes(e,{match:lT(e,"table","th","td"),at:t.at}),2),r=n[0],o=n[1];if(r&&o){var i=AT(Lg(r,1)[0]),a=Lg(o,2),s=a[0],u=a[1],l=s.rowSpan,c=void 0===l?1:l,d=s.colSpan,f=void 0===d?1:d;1===c&&1===f||mh.withoutNormalizing(e,function(){Wh.setNodes(e,{rowSpan:1,colSpan:1},{at:u});for(var t=1;t<f;t+=1){var n={type:"table-cell",children:[{text:""}]};0===u[u.length-2]&&i&&(n.isHeader=!0);var r=u.slice(0,-1),o=u[u.length-1]+t,a=Mg(Mg([],Lg(r),!1),[o],!1);try{Wh.insertNodes(e,n,{at:a})}catch(t){try{var s=Lg(mh.node(e,r),1)[0].children.length,l=Mg(Mg([],Lg(r),!1),[s],!1);Wh.insertNodes(e,n,{at:l})}catch(e){console.warn("插入同行单元格失败: ".concat(e instanceof Error?e.message:String(e)))}}}for(var d=1;d<c;d+=1){var p=u[u.length-2]+d,h=Mg(Mg([],Lg(u.slice(0,-2)),!1),[p],!1);try{var g=Lg(mh.node(e,h),1)[0];if(!g){console.warn("目标行 ".concat(p," 不存在"));continue}for(t=0;t<f;t+=1){n={type:"table-cell",children:[{text:""}]},o=u[u.length-1]+t,a=Mg(Mg([],Lg(h),!1),[o],!1);try{var v=g.children.length;if(o>=v){var m=Mg(Mg([],Lg(h),!1),[v],!1);Wh.insertNodes(e,n,{at:m})}else Wh.insertNodes(e,n,{at:a})}catch(t){try{var y=g.children.length;l=Mg(Mg([],Lg(h),!1),[y],!1);Wh.insertNodes(e,n,{at:l})}catch(e){console.warn("插入单元格到第".concat(d,"行失败: ").concat(e instanceof Error?e.message:String(e)))}}}}catch(e){console.warn("处理第".concat(d,"行时出错: ").concat(e instanceof Error?e.message:String(e)))}}})}},e}(),kT=function(){function e(){this.title=QE("tableModule.header"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M704 128l-64 0L384 128 320 128 0 128l0 256 0 64 0 192 0 64 0 256 320 0 64 0 256 0 64 0 320 0 0-256 0-64L1024 448 1024 384 1024 128 704 128zM640 640 384 640 384 448l256 0L640 640zM64 448l256 0 0 192L64 640 64 448zM320 896 64 896l0-192 256 0L320 896zM640 896 384 896l0-192 256 0L640 896zM960 896l-256 0 0-192 256 0L960 896zM960 640l-256 0L704 448l256 0L960 640z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){var t=Iy.getSelectedNodeByType(e,"table");return null!=t&&AT(t)},e.prototype.isActive=function(e){return!!this.getValue(e)},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Bp.isCollapsed(t)||null==Iy.getSelectedNodeByType(e,"table"))},e.prototype.exec=function(e,t){if(!this.isDisabled(e)){var n=!t,r=Iy.getSelectedNodeByType(e,"table");if(null!=r)DT(r).forEach(function(t){return Wh.setNodes(e,{isHeader:n},{at:Iy.findPath(e,t)})})}},e}(),FT={key:"insertTable",factory:function(){return new xT}},IT={key:"deleteTable",factory:function(){return new wT}},PT={key:"insertTableRow",factory:function(){return new OT}},RT={key:"deleteTableRow",factory:function(){return new ET}},_T={key:"insertTableCol",factory:function(){return new ST}},LT={key:"deleteTableCol",factory:function(){return new bT}},MT={key:"tableHeader",factory:function(){return new kT}},jT={key:"tableFullWidth",factory:function(){return new CT}},HT={key:"mergeTableCell",factory:function(){return new BT}},zT={key:"splitTableCell",factory:function(){return new TT}},$T={key:"setTableProperty",factory:function(){return new mT}},UT={key:"setTableCellProperty",factory:function(){return new yT}};var VT={selector:"td:not([data-w-e-type]),th:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r=Zv(e),o=r.text().replace(/\s+/gm," ").trim();0===(t=t.filter(function(e){return"paragraph"===Iy.getNodeType(e)||(!!Nh.isText(e)||!!n.isInline(e))})).length&&(t=[{text:r.text().replace(/\s+/gm," ")}]);var i=parseInt(r.attr("colSpan")||"1",10),a=parseInt(r.attr("rowSpan")||"1",10),s="none"===hT(r,"display")&&0===o.length,u=r.attr("width")||"auto";return{type:"table-cell",isHeader:"th"===pT(r),colSpan:i,rowSpan:a,width:u,children:t,hidden:s}}};var WT={selector:"tr:not([data-w-e-type])",parseElemHtml:function(e,t,n){for(var r=Zv(e),o=[],i=0;i<t.length;i+=1){var a=t[i];if("table-cell"===Iy.getNodeType(a)){var s=a;if(s.hidden)continue;o.push(s)}}return{type:"table-row",height:parseInt(hT(r,"height")||"0",10)||void 0,children:o}}};var GT,qT={selector:"table:not([data-w-e-type])",parseElemHtml:function(e,t,n){var r,o,i=Zv(e),a="auto";"100%"===hT(i,"width")&&(a="100%"),"100%"===i.attr("width")&&(a="100%");var s={type:"table",width:a,height:parseInt(hT(i,"height")||"0",10),children:t.filter(function(e){return"table-row"===Iy.getNodeType(e)})},u=(null===(r=i.find("tr")[0])||void 0===r?void 0:r.children)||[],l=(null===(o=i.find("colgroup")[0])||void 0===o?void 0:o.children)||null,c=l?Array.from(l).map(function(e){return parseInt(e.getAttribute("width"),10)}).filter(function(e){return!Number.isNaN(e)}):[];if(c.length>0)s.columnWidths=c;else if(u.length>0){var d=[];Array.from(u).forEach(function(e){var t=parseInt(Zv(e).attr("colSpan")||"1",10),n=parseInt(hT(Zv(e),"width")||"90",10);d.push(n);for(var r=1;r<t;r+=1)d.push(90)}),s.columnWidths=d}return s}},KT=null===(GT=null===window||void 0===window?void 0:window.getComputedStyle(document.documentElement))||void 0===GT?void 0:GT.getPropertyValue("--w-e-textarea-border-color");function YT(e){var t=e.selection;if(null==t)return!1;var n=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")}}),1),r=n[0];if(r){var o=Lg(r,2)[1],i=mh.start(e,o);if(wh.equals(t.anchor,i))return!0}return!1}function XT(e,t){var n=t.offset;if(0===n)return!1;var r=mh.node(e,t);if(!Nh.isText(r[0]))return!1;var o=_p.string(r[0]);return!(n>=o.length)&&("\n"===o[n-1]&&"\r"===o[n])}function ZT(e,t,n){var r=e.selection;if(null==r||"line"===t)return!1;var o=Lg(mh.nodes(e,{match:function(e){return Iy.checkNodeType(e,"table-cell")}}),1),i=o[0],a=r.anchor;if("backward"===n&&0===r.anchor.offset&&(a=mh.before(e,r)),"forward"===n&&mh.isEnd(e,r.anchor,r.anchor.path)&&(a=mh.after(e,r)),null==a)return!1;var s=mh.above(e,{at:a,match:function(e){return Iy.checkNodeType(e,"table-cell")}});if(null==s||null==i||!Cp.equals(s[1],i[1]))return!1;var u=mh.node(e,a);if(!Nh.isText(u[0])||u[0].text.length<2)return!1;var l="backward"===n?[a.offset-2,a.offset]:[a.offset,a.offset+2],c=_p.string(u[0]);return"\n\r"===c.slice.apply(c,Mg([],Lg(l),!1))?(Wh.insertText(e,c.slice(0,l[0])+c.slice(l[1]),{at:{anchor:mh.start(e,a.path),focus:mh.end(e,a.path)}}),!0):!!XT(e,a)&&(Wh.insertText(e,c.slice(0,r.anchor.offset-1)+c.slice(r.anchor.offset+1),{at:{anchor:mh.start(e,a.path),focus:mh.end(e,a.path)}}),!0)}function JT(e,t){var n=mh.nodes(e,{at:t,match:function(e){return"table"===Iy.getNodeType(e)}});return!!Mg([],Lg(n),!1).find(function(){return!0})}function QT(e){var t,n;try{for(var r=_g(["paragraph","header1","header2","header3","header4","header5","header6","blockquote","list-item","todo","divider"]),o=r.next();!o.done;o=r.next()){var i=o.value;if(Iy.getSelectedNodeByType(e,i))return!0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return!1}function ek(e){var t=document.createElement("div");t.innerHTML=e;var n=[],r=!1;return Array.from(t.childNodes).forEach(function(e){if(e.nodeType!==Node.TEXT_NODE){if(!(e instanceof HTMLElement)||"p"!==e.tagName.toLowerCase())return n.push(e.cloneNode(!0)),void(r=!0);var t=e.innerHTML,o=t.trim();if(o&&" "!==o){r&&n.push(document.createElement("br"));var i=document.createElement("div");i.innerHTML=t,Array.from(i.childNodes).forEach(function(e){n.push(e.cloneNode(!0))}),r=!0}}else(e.textContent||"").trim()&&(n.push(e.cloneNode(!0)),r=!0)}),t.replaceChildren.apply(t,Mg([],Lg(n),!1)),t.innerHTML}var tk={selector:"table",preParseHtml:function(e){var t=Zv(e);if("table"!==pT(t))return e;var n=t.find("tbody");if(0===n.length)return e;var r=t.find("tr");t.append(r),n.remove();for(var o=t.find("td, th"),i=0;i<o.length;i+=1){var a=Zv(o[i]);a.attr("width","auto");var s=a.html()||"";s=ek(s=(s=s.replace(/<o:p[^>]*>[\s\S]*?<\/o:p>/gi,"")).replace(/<\/o:p>/gi,"")),a.html(s)}return t[0]}};function nk(e){var t,n,r=[],o=0;try{for(var i=_g(e),a=i.next();!a.done;a=i.next()){o+=a.value,r.push(o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}function rk(e){var t,n,r=[],o=e.reduce(function(e,t){return e+t},0);try{for(var i=_g(e),a=i.next();!a.done;a=i.next()){var s=a.value;r.push(s/o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var ok=null;var ik=!1,ak=!1,sk=0,uk=null,lk=Zv(window);lk.on("mousedown",function(e){var t=e.target;if(t.closest('[data-block-type="table-cell"]'))ik=!0;else if("DIV"===t.tagName&&t.closest(".column-resizer-item")){if(null===uk)return;ak=!0;var n=e.clientX;sk=n,document.body.style.cursor="col-resize",e.preventDefault()}lk.on("mousemove",ck),lk.on("mouseup",dk)});var ck=Sw(function(e){if(ak&&null!==uk){e.preventDefault();var t,n=e.clientX,r=n-sk,o=Lg(mh.nodes(uk,{match:lT(uk,"table")}),1),i=Lg(o[0],1)[0],a=i.columnWidths,s=void 0===a?[]:a,u=i.resizingIndex,l=void 0===u?-1:u,c=Iy.getSelectedNodeByType(uk,"table"),d=Iy.toDOMNode(uk,c).querySelector(".table");if(d)t=function(e,t,n,r,o){var i=Mg([],Lg(e),!1);if(t<0||t>=e.length)return i;var a=o.getMenuConfig("insertTable").minWidth,s=parseInt((void 0===a?60:a).toString(),10)||60,u=n-(0===t?0:r[t-1]),l=Math.max(s,u);return i[t]=Math.floor(100*l)/100,i}(s,l,n-d.getBoundingClientRect().left,nk(s),uk);else t=function(e,t,n,r){var o=Mg([],Lg(e),!1),i=r.getMenuConfig("insertTable").minWidth,a=parseInt((void 0===i?60:i).toString(),10)||60,s=o[t],u=Math.max(a,s+n);return o[t]=Math.floor(100*u)/100,o}(s,l,r,uk);Wh.setNodes(uk,{columnWidths:t},{mode:"highest"})}},100);function dk(e){ik=!1,ak=!1,uk=null,document.body.style.cursor="",lk.off("mousemove",ck),lk.off("mouseup",dk)}function fk(e,t){"mouseenter"===t.type?Wh.setNodes(e,{isResizing:!0},{mode:"highest"}):Wh.setNodes(e,{isResizing:!1},{mode:"highest"})}function pk(e){var t,n,r=[],o=0;try{for(var i=_g(e),a=i.next();!a.done;a=i.next()){o+=a.value,r.push(o)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}var hk=!1,gk=0,vk=null,mk=Zv(window);var yk=Sw(function(e){if(hk&&null!==vk){e.preventDefault();var t,n=e.clientY,r=n-gk,o=Lg(mh.nodes(vk,{match:lT(vk,"table")}),1),i=Lg(o[0],1)[0],a=i.children,s=i.resizingRowIndex,u=void 0===s?-1:s,l=a.map(function(e){return e.height||30}),c=Iy.getSelectedNodeByType(vk,"table"),d=Iy.toDOMNode(vk,c).querySelector(".table");if(d)t=function(e,t,n,r,o){var i=Mg([],Lg(e),!1);if(t<0||t>=e.length)return i;var a=(o.getMenuConfig("insertTable")||{}).minRowHeight,s=parseInt((void 0===a?30:a).toString(),10)||30,u=n-(0===t?0:r[t-1]),l=Math.max(s,u);return i[t]=Math.floor(100*l)/100,i}(l,u,n-d.getBoundingClientRect().top,pk(l),vk);else t=function(e,t,n,r){var o=Mg([],Lg(e),!1),i=(r.getMenuConfig("insertTable")||{}).minRowHeight,a=parseInt((void 0===i?30:i).toString(),10)||30,s=o[t],u=Math.max(a,s+n);return o[t]=Math.floor(100*u)/100,o}(l,u,r,vk);var f=Iy.getSelectedNodeByType(vk,"table");if(f&&u>=0&&u<t.length){var p=Mg(Mg([],Lg(Iy.findPath(vk,f)),!1),[u],!1);try{Wh.setNodes(vk,{height:t[u]},{at:p})}catch(e){console.warn("更新行高度失败:",e)}}}},100);function bk(e){hk=!1,vk=null,document.body.style.cursor="",mk.off("mousemove",yk),mk.off("mouseup",bk)}function Ek(e,t){"mouseenter"===t.type?Wh.setNodes(e,{isResizingRow:!0},{mode:"highest"}):Wh.setNodes(e,{isResizingRow:!1},{mode:"highest"})}mk.on("mousedown",function(e){var t=e.target;if("DIV"===t.tagName&&t.closest(".row-resizer-item")){if(null===vk)return;hk=!0;var n=e.clientY;gk=n,document.body.style.cursor="row-resize",e.preventDefault()}mk.on("mousemove",yk),mk.on("mouseup",bk)});var wk={type:"table",renderElem:function(e,t,n){var r=function(e,t){if(e.isDisabled())return!1;var n=e.selection;if(null==n)return!0;if(Bp.isCollapsed(n))return!0;var r=n.anchor,o=n.focus,i=Iy.findPath(e,t),a=mh.start(e,i),s=mh.end(e,i),u=wh.compare(r,s)<=0&&wh.compare(r,a)>=0,l=wh.compare(o,s)<=0&&wh.compare(o,a)>=0;return!!(u&&l&&Cp.equals(r.path.slice(0,3),o.path.slice(0,3)))}(n,e),o=e,i=o.width,a=void 0===i?"auto":i,s=o.height,u=o.columnWidths,l=void 0===u?[]:u,c=o.scrollWidth,d=void 0===c?0:c,f=o.isHoverCellBorder,p=o.resizingIndex,h=o.isResizing,g=o.isHoverRowBorder,v=o.resizingRowIndex,m=o.isResizingRow,y=Iy.isNodeSelected(n,e),b=Lg(NT.selection(n),1)[0],E=rk(l),w=BC("div",{className:"table-container","data-selected":y,on:{mousedown:function(t){if("DIV"===t.target.tagName&&t.preventDefault(),!n.isDisabled()){t.target.closest('[data-block-type="table-cell"]')&&NT.unselect(n);var r=Iy.findPath(n,e),o=mh.start(n,r),i=n.selection;if(null!=i)i.anchor.path[0]!==r[0]&&"DIV"===t.target.tagName&&n.select(o);else n.select(o)}}}},BC("table",{width:a,contentEditable:r,className:"table ".concat(b?"table-selection-none":""),style:{width:"100%"===a?a:"".concat(l.reduce(function(e,t){return e+t},0),"px")},on:{mousemove:rE(function(t){NT.hasSelected(n)||(function(e,t,n,r){if(!e.isDisabled()&&!ik&&!ak){var o=t,i=o.width,a=void 0===i?"auto":i,s=o.columnWidths,u=void 0===s?[]:s,l=o.isHoverCellBorder,c=o.resizingIndex,d=n.clientX,f=n.target;if(jm(f)&&d>(g=f.getBoundingClientRect()).x+5&&d<g.x+g.width-5)return void(l&&Wh.setNodes(e,{isHoverCellBorder:!1,resizingIndex:-1},{mode:"highest"}));if(jm(f)){var p=f.closest(".table");if(p)for(var h=n.clientX,g=p.getBoundingClientRect(),v="100%"===a?rk(u).map(function(e){return e*r}):u,m=nk(v),y=0;y<m.length;y+=1)if(h-g.x>=m[y]-5&&h-g.x<m[y]+5){if(c===y)return;return void Wh.setNodes(e,{isHoverCellBorder:!0,resizingIndex:y},{mode:"highest"})}}!0===l&&Wh.setNodes(e,{isHoverCellBorder:!1,resizingIndex:-1},{mode:"highest"})}}(n,e,t,d),function(e,t,n){if(!e.isDisabled()&&!hk){var r=t,o=r.children,i=r.isHoverRowBorder,a=r.resizingRowIndex,s=n.target;if(jm(s)){var u=s.closest(".table");if(u)for(var l=n.clientY,c=u.getBoundingClientRect(),d=pk(o.map(function(e){return e.height||30})),f=0;f<d.length;f+=1)if(l-c.y>=d[f]-5&&l-c.y<d[f]+5){if(a===f)return;return void Wh.setNodes(e,{isHoverRowBorder:!0,resizingRowIndex:f},{mode:"highest"})}}!0===i&&Wh.setNodes(e,{isHoverRowBorder:!1,resizingRowIndex:-1},{mode:"highest"})}}(n,e,t))},25)}},BC("colgroup",{contentEditable:!1},l.map(function(e){return BC("col",{width:e})})),BC("tbody",null,t)),BC("div",{className:"column-resizer",contentEditable:!1},l.map(function(e,t){var r=e;return"100%"===a&&(r=E[t]*d),BC("div",{className:"column-resizer-item",style:{minWidth:"".concat(r,"px")}},BC("div",{className:"resizer-line-hotzone ".concat(f&&t===p?"visible ":"").concat(h&&t===p?"highlight":""),style:{height:"".concat(s,"px")},on:{mouseenter:function(e){return fk(n,e)},mouseleave:function(e){return fk(n,e)},mousedown:function(e){return function(e){ak||(uk=e)}(n)}}},BC("div",{className:"resizer-line"})))})),BC("div",{className:"row-resizer",contentEditable:!1},e.children.map(function(e,t){var r=l.reduce(function(e,t){return e+t},0),o=e.height||30;return BC("div",{className:"row-resizer-item",style:{minHeight:"".concat(o,"px")}},BC("div",{className:"resizer-line-hotzone-horizontal ".concat(g&&t===v?"visible ":"").concat(m&&t===v?"highlight":""),style:{width:"".concat(r,"px")},on:{mouseenter:function(e){return Ek(n,e)},mouseleave:function(e){return Ek(n,e)},mousedown:function(e){return function(e){hk||(vk=e)}(n)}}},BC("div",{className:"resizer-line-horizontal"})))}))),C=lC("div",{hook:{insert:function(e){var t=e.elm;return function(e,t){if(jm(t)){var n=t.querySelector("table");n&&(ok=new ResizeObserver(function(t){var n=Lg(t,1)[0].contentRect;Wh.setNodes(e,{scrollWidth:n.width,height:n.height},{mode:"highest"})}),ok.observe(n))}}(n,t)},destroy:function(){ok&&(null==ok||ok.disconnect(),ok=null)}}},w);return C}},Ck={type:"table-row",renderElem:function(e,t,n){var r=e.height;return BC("tr",{style:r?{height:"".concat(r,"px")}:{}},t)}},Dk={type:"table-cell",renderElem:function(e,t,n){var r=function(e,t){var n=Iy.getParentNode(e,t);if(null==n)return!1;var r=Iy.getParentNode(e,n);return null!=r&&DT(r).some(function(e){return e===t})}(n,e),o=e,i=o.colSpan,a=void 0===i?1:i,s=o.rowSpan,u=void 0===s?1:s,l=o.isHeader,c=void 0!==l&&l,d=o.hidden,f=void 0!==d&&d,p=NT.isSelected(n,e);return BC(r&&c?"th":"td",{colSpan:a,rowSpan:u,"data-block-type":"table-cell",className:p?"w-e-selected":"",style:{display:f?"none":""}},t)}};function Ak(e,t){null==e.data&&(e.data={});var n=e.data;null==n.style&&(n.style={}),Object.assign(n.style,t)}var Sk={renderStyle:function(e,t){var n,r;if(!kp.isElement(e))return t;var o=e,i=o.backgroundColor,a=o.borderWidth,s=o.borderStyle,u=o.borderColor,l=o.textAlign,c={};if(i&&(c.backgroundColor=i),a){/^\d+(\.\d+)?$/.test(a)?c.borderWidth="".concat(a,"px"):c.borderWidth=a}s&&(c.borderStyle="none"===s?"":s),u&&(c.borderColor=u),l&&(c.textAlign=l);var d=t;return"table"===e.type?Ak(null===(r=(null===(n=d.children)||void 0===n?void 0:n[0]).children)||void 0===r?void 0:r[0],c):Ak(d,c),d},styleToHtml:function(e,t){if("table"!==e.type&&"table-cell"!==e.type)return t;var n=e.backgroundColor,r=e.borderWidth,o=e.borderStyle,i=e.borderColor,a=e.textAlign;if(!(n||r||o||i||a))return t;var s=Zv(t);return n&&s.css("background-color",n),r&&s.css("border-width","".concat(r,"px")),o&&s.css("border-style","none"===o?"":o),i&&s.css("border-color",i),a&&s.css("text-align",a),function(e){return 0===e.length?"":e[0].outerHTML}(s)},parseStyleHtml:function(e,t,n){if(!["TABLE","TD","TH"].includes(e.tagName))return t;var r=Zv(e),o=t,i=hT(r,"background-color");i||(i=hT(r,"background")),i&&(o.backgroundColor=i);var a=hT(r,"border");a||"TD"!==e.tagName||(a="1px solid ".concat(KT));var s,u=Lg((null==a?void 0:a.split(" "))||[],3),l=u[0],c=u[1],d=u[2];(l=hT(r,"border-width")||l)&&(o.borderWidth=(s=l.trim())&&"string"==typeof s&&s.includes("pt")?s.replace(/(\d+(\.\d+)?)\s*pt/g,function(e,t){var n=(4*parseFloat(t)/3).toFixed(2);return"".concat(n,"px")}):s),(c=hT(r,"border-style")||c)&&(o.borderStyle="none"===c?"":c),(d=hT(r,"border-color")||d)&&(o.borderColor=d);var f=hT(r,"text-align");return(f=hT(r,"text-align")||f)&&(o.textAlign=f),t},renderElems:[wk,Ck,Dk],elemsToHtml:[oT,iT,aT],preParseHtml:[tk],parseElemsHtml:[VT,WT,qT],menus:[FT,IT,PT,RT,_T,LT,MT,jT,HT,zT,$T,UT],editorPlugin:function(e){var t=e.insertBreak,n=e.deleteBackward,r=e.deleteForward,o=e.deleteFragment,i=e.normalizeNode,a=e.insertData,s=e.handleTab,u=e.selectAll,l=e;l.insertBreak=function(){null==Iy.getSelectedNodeByType(l,"table")?t():l.insertText("\n\r")},l.deleteBackward=function(e){if(!YT(l)&&!ZT(l,e,"backward")){var t=l.selection;if(t){var r=mh.before(l,t),o=mh.above(l,{at:t,match:function(e){return Iy.checkNodeType(e,"table-cell")}});if(r){var i=JT(l,r);if(!o&&i&&QT(l))return}}n(e)}},l.handleTab=function(){var t;if(Iy.getSelectedNodeByType(l,"table")){var n=mh.above(e);Iy.checkNodeType(n[0],"table-cell")&&Wh.select(e,n[1]);var r=mh.next(e);if(r)r[0]&&r[0].text&&(r=null!==(t=mh.above(e,{at:r[1]}))&&void 0!==t?t:r),Wh.select(e,r[1]);else{var o=l.children||[],i=o.length;if(Iy.checkNodeType(o[i-1],"table")){var a=Iy.genEmptyParagraph();Wh.insertNodes(l,a,{at:[i]}),l.handleTab()}}}else s()},l.deleteForward=function(e){if(!YT(l)&&!ZT(l,e,"forward")){var t=l.selection;if(t){var n=mh.after(l,t),o=mh.above(l,{at:t,match:function(e){return Iy.checkNodeType(e,"table-cell")}});if(n){var i=JT(l,n);if(!o&&i&&QT(l))return}}r(e)}},l.deleteFragment=function(e){var t=l.selection;if(t){var n,r=!1,i={anchor:t.anchor,focus:t.focus},a=wh.isBefore(i.anchor,i.focus);if(XT(l,t.anchor))(n=mh[a?"before":"after"](l,t.anchor))&&(i.anchor=n),r=!0;if(XT(l,t.focus))(n=mh[a?"after":"before"](l,t.focus))&&(i.focus=n),r=!0;r&&Wh.setSelection(l,i),o(e)}},l.normalizeNode=function(e){var t=Lg(e,2),n=t[0],r=t[1];if("table"!==Iy.getNodeType(n))return i([n,r]);if(Iy.isLastNode(l,n)){var o=Iy.genEmptyParagraph();Wh.insertNodes(l,o,{at:[r[0]+1]})}},l.insertData=function(e){if(null!=Iy.getSelectedNodeByType(l,"table")){var t=e.getData("text/plain");"\n"===t||/<img[^>]+>/.test(e.getData("text/html"))?a(e):mh.insertText(l,t)}else a(e)},l.selectAll=function(){var e=l.selection;if(null!=e){var t=Iy.getSelectedNodeByType(l,"table-cell");if(null!=t){var n=e.anchor,r=e.focus;if(Cp.equals(n.path.slice(0,3),r.path.slice(0,3)))if(0!==_p.string(t).length){var o=Iy.findPath(l,t),i={anchor:mh.start(l,o),focus:mh.end(l,o)};l.select(i)}else u();else u()}else u()}else u()},function(e){var t=e.apply;e.apply=function(n){if(!Hp.isSelectionOperation(n)||!n.newProperties)return t(n);var r=Ig(Ig({},e.selection),n.newProperties);if(!Bp.isRange(r))return NT.unselect(e),t(n);var o=function(e){return kp.isElement(e)&&("table-cell"===e.type||"th"===e.type||"td"===e.type)},i=Lg(mh.nodes(e,{match:o,at:Bp.start(r),mode:"lowest"}),1)[0],a=Lg(mh.nodes(e,{match:o,at:Bp.end(r),mode:"lowest"}),1)[0];if(!i||!a)return NT.unselect(e),t(n);var s=Lg(i,2)[1],u=Lg(a,2)[1];if(Cp.equals(s,u)||!cT(e,[s,u],"table"))return NT.unselect(e),t(n);try{var l=dT(e,{at:s});if(!l||0===l.length)return NT.unselect(e),t(n);for(var c=fT.valueOf(0,0),d=fT.valueOf(0,0),f=!1,p=!1,h=0;h<l.length;h+=1)if(l[h])for(var g=0;g<l[h].length;g+=1)if(l[h][g]){var v=Lg(l[h][g],1),m=Lg(v[0],2)[1];Cp.equals(s,m)&&(c.x=h,c.y=g,f=!0),Cp.equals(u,m)&&(d.x=h,d.y=g,p=!0)}if(!f||!p)return NT.unselect(e),t(n);for(var y=fT.valueOf(Math.min(c.x,d.x),Math.min(c.y,d.y)),b=fT.valueOf(Math.max(c.x,d.x),Math.max(c.y,d.y));;){var E=fT.valueOf(y.x,y.y),w=fT.valueOf(b.x,b.y);for(h=E.x;h<=w.x&&h<l.length;h+=1)if(l[h])for(g=E.y;g<=w.y&&g<l[h].length;g+=1)if(l[h][g]){var C=Lg(l[h][g],2)[1];if(C){var D=C.rtl,A=C.ltr,S=C.btt,O=C.ttb;E.x=Math.min(E.x,h-(O-1)),E.y=Math.min(E.y,g-(D-1)),w.x=Math.max(w.x,h+(S-1)),w.y=Math.max(w.y,g+(A-1))}}if(fT.equals(y,E)&&fT.equals(b,w))break;y=E,b=w}var x=[],N=new WeakSet;for(h=y.x;h<=b.x&&h<l.length;h+=1)if(l[h]){var B=[];for(g=y.y;g<=b.y&&g<l[h].length;g+=1)if(l[h][g]){var T=Lg(l[h][g],1),k=Lg(T[0],1)[0];k&&(N.add(k),B.push(l[h][g]))}B.length>0&&x.push(B)}gT.set(e,x),vT.set(e,N)}catch(r){return NT.unselect(e),t(n)}t(n)}}(l),l.getTableSelection=function(){return gT.get(l)||null};var c=l.addMark,d=l.removeMark,f=Ig({},Wh);return l.addMark=function(e,t){var n=gT.get(l);if(n&&n.length>0){var r=l.selection;n.forEach(function(n){n.forEach(function(n){var r=Lg(n[0],2)[1],o=mh.start(l,r),i=mh.end(l,r);Wh.select(l,{anchor:o,focus:i}),c(e,t)})}),r&&Wh.select(l,r)}else c(e,t)},l.removeMark=function(e){var t=gT.get(l);if(t&&t.length>0){var n=l.selection;t.forEach(function(t){t.forEach(function(t){var n=Lg(t[0],2)[1],r=mh.start(l,n),o=mh.end(l,n);Wh.select(l,{anchor:r,focus:o}),d(e)})}),n&&Wh.select(l,n)}else d(e)},Wh.setNodes=function(e,t,n){if(void 0===n&&(n={}),e===l){var r=gT.get(l);if(r&&r.length>0)return"hidden"in t||"rowSpan"in t||"colSpan"in t?void f.setNodes(e,t,n):void r.forEach(function(r){r.forEach(function(r){var o=Lg(r[0],2)[1];f.setNodes(e,t,Ig(Ig({},n),{at:o}))})})}f.setNodes(e,t,n)},l}};YE("en",{uploadImgModule:{uploadImage:"Upload Image",uploadError:"{{fileName}} upload error"}}),YE("zh-CN",{uploadImgModule:{uploadImage:"上传图片",uploadError:"{{fileName}} 上传出错"}});bm&&(Zv.fn.append=bm),am&&(Zv.fn.on=am),Sm&&(Zv.fn.remove=Sm),im&&(Zv.fn.val=im),Bm&&(Zv.fn.click=Bm),dm&&(Zv.fn.hide=dm);var Ok=new WeakMap;function xk(e){return e.getMenuConfig("uploadImage")}function Nk(e,t){return Pg(this,void 0,void 0,function(){return Rg(this,function(n){return[2,new Promise(function(n){var r=new FileReader;r.readAsDataURL(t),r.onload=function(){var o=r.result;if(o){var i=o.toString(),a=0===i.indexOf("data:image")?"":i;Zx(e,i,t.name,a),n("ok")}}})]})})}function Bk(e,t){return Pg(this,void 0,void 0,function(){var n,r;return Rg(this,function(o){switch(o.label){case 0:return n=function(e){var t=Ok.get(e);if(null!=t)return t;var n=xk(e),r=n.onSuccess,o=n.onProgress,i=n.onFailed,a=n.customInsert,s=n.onError;return t=KS(Ig(Ig({},n),{onProgress:function(t){e.showProgressBar(t),o&&o(t)},onSuccess:function(t,n){if(a)return a(n,function(t,n,r){return Zx(e,t,n,r)}),void r(t,n);var o=n.errno,s=void 0===o?1:o,u=n.data,l=void 0===u?{}:u;if(0===s){if(Array.isArray(l))l.forEach(function(t){var n=t.url,r=void 0===n?"":n,o=t.alt,i=void 0===o?"":o,a=t.href;Zx(e,r,i,void 0===a?"":a)});else{var c=l.url,d=void 0===c?"":c,f=l.alt,p=void 0===f?"":f,h=l.href;Zx(e,d,p,void 0===h?"":h)}r(t,n)}else i(t,n)},onError:function(e,t,n){s(e,t,n)}})),Ok.set(e,t),t}(e),r=t.map(function(e){return{name:e.name,type:e.type,size:e.size,data:e}}),n.addFiles(r),[4,n.upload()];case 1:return o.sent(),[2]}})})}function Tk(e,t){return Pg(this,void 0,void 0,function(){var n,r,o,i,a,s,u,l,c,d,f,p,h,g,v;return Rg(this,function(m){switch(m.label){case 0:if(null==t)return[2];n=Array.prototype.slice.call(t),r=xk(e),o=r.customUpload,i=r.base64LimitSize,a=[],m.label=1;case 1:m.trys.push([1,10,11,16]),s=!0,u=jg(n),m.label=2;case 2:return[4,u.next()];case 3:return l=m.sent(),(p=l.done)?[3,9]:(v=l.value,s=!1,d=(c=v).size,i&&d<=i?[4,Nk(e,c)]:[3,5]);case 4:return m.sent(),[3,8];case 5:return o?[4,o(c,function(t,n,r){return Zx(e,t,n,r)},e)]:[3,7];case 6:return m.sent(),[3,8];case 7:a.push(c),m.label=8;case 8:return s=!0,[3,2];case 9:return[3,16];case 10:return f=m.sent(),h={error:f},[3,16];case 11:return m.trys.push([11,,14,15]),s||p||!(g=u.return)?[3,13]:[4,g.call(u)];case 12:m.sent(),m.label=13;case 13:return[3,15];case 14:if(h)throw h.error;return[7];case 15:return[7];case 16:return a.length>0?[4,Bk(e,a)]:[3,18];case 17:m.sent(),m.label=18;case 18:return[2]}})})}var kk=function(){function e(){this.title=QE("uploadImgModule.uploadImage"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M828.708571 585.045333a48.761905 48.761905 0 0 0-48.737523 48.761905v18.529524l-72.143238-72.167619a135.972571 135.972571 0 0 0-191.585524 0l-34.133334 34.133333-120.880762-120.953905a138.898286 138.898286 0 0 0-191.585523 0l-72.167619 72.167619V292.400762a48.786286 48.786286 0 0 1 48.761904-48.761905h341.23581a48.737524 48.737524 0 0 0 34.474667-83.285333 48.737524 48.737524 0 0 0-34.474667-14.287238H146.236952A146.212571 146.212571 0 0 0 0 292.400762v585.289143A146.358857 146.358857 0 0 0 146.236952 1024h584.996572a146.212571 146.212571 0 0 0 146.236952-146.310095V633.807238a48.786286 48.786286 0 0 0-48.761905-48.761905zM146.261333 926.45181a48.737524 48.737524 0 0 1-48.761904-48.761905v-174.128762l141.409523-141.458286a38.497524 38.497524 0 0 1 53.126096 0l154.526476 154.624 209.627428 209.724953H146.236952z m633.734096-48.761905c-0.073143 9.337905-3.145143 18.383238-8.777143 25.843809l-219.843048-220.94019 34.133333-34.133334a37.546667 37.546667 0 0 1 53.613715 0l140.873143 141.897143V877.714286zM1009.615238 160.231619L863.329524 13.897143a48.737524 48.737524 0 0 0-16.091429-10.24c-11.849143-4.87619-25.161143-4.87619-37.059047 0a48.761905 48.761905 0 0 0-16.067048 10.24l-146.236952 146.334476a49.005714 49.005714 0 0 0 69.217523 69.241905l62.902858-63.390476v272.627809a48.761905 48.761905 0 1 0 97.475047 0V166.083048l62.902857 63.390476a48.737524 48.737524 0 0 0 69.217524 0 48.761905 48.761905 0 0 0 0-69.241905z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.isDisabled=function(e){return Kx(e)},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadImage")},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i(function(t,n,r){return Zx(e,t,n,r)});else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var s=Zv("body"),u=Zv('<input type="file" '.concat(a," multiple/>"));u.hide(),s.append(u),u.click(),u.on("change",function(){var t=u[0].files;Tk(e,t)})}},e}();var Fk={menus:[{key:"uploadImage",factory:function(){return new kk},config:{server:"",fieldName:"wangeditor-uploaded-image",maxFileSize:2097152,maxNumberOfFiles:100,allowedFileTypes:["image/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:1e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'".concat(e.name,"' upload failed"),t)},onError:function(e,t,n){console.error("'".concat(e.name,"' upload error"),n)},base64LimitSize:0}}],editorPlugin:function(e){var t=e.insertData,n=e;return n.insertData=function(r){if(Kx(n))t(r);else if(r.getData("text/plain"))t(r);else{var o=r.files;if(o.length<=0)t(r);else Array.prototype.slice.call(o).some(function(e){return"image"===Lg(e.type.split("/"),1)[0]})?Tk(e,o):t(r)}},n}};function Ik(e){return e.length?e[0].tagName.toLowerCase():""}function Pk(e,t,n,r){void 0===t&&(t="auto"),void 0===n&&(n="auto"),void 0===r&&(r={});var o=Zv(e),i=r.width,a=void 0===i?"":i,s=r.height,u=void 0===s?"":s,l="";return a&&(l+="width: ".concat(a,";")),u&&(l+="height: ".concat(u,";")),o.attr("width",t),o.attr("height",n),o.attr("style",l),o[0].outerHTML}YE("en",{videoModule:{delete:"Delete",uploadVideo:"Upload video",insertVideo:"Insert video",videoSrc:"Video source",videoSrcPlaceHolder:"Video file url, or third-party <iframe>",videoPoster:"Video poster",videoPosterPlaceHolder:"Poster image url",ok:"Ok",editSize:"Edit size",edit:"Edit video",width:"Width",height:"Height"}}),YE("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",edit:"编辑视频",width:"宽度",height:"高度"}}),bm&&(Zv.fn.append=bm),am&&(Zv.fn.on=am),Tm&&(Zv.fn.focus=Tm),tm&&(Zv.fn.attr=tm),im&&(Zv.fn.val=im),vm&&(Zv.fn.html=vm),wm&&(Zv.fn.parent=wm),em&&(Zv.fn.hasClass=em),Om&&(Zv.fn.empty=Om);var Rk={type:"video",elemToHtml:function(e,t){var n=e,r=n.src,o=void 0===r?"":r,i=n.poster,a=void 0===i?"":i,s=n.width,u=void 0===s?"auto":s,l=n.height,c=void 0===l?"auto":l,d=n.style,f=void 0===d?{}:d,p=n.textAlign,h='<div data-w-e-type="video" data-w-e-is-void style="text-align: '.concat(void 0===p?"center":p,';">\n');if(0===o.trim().indexOf("<iframe ")){h+=Pk(o,u,c,f)}else{var g=f.width,v=void 0===g?"":g,m=f.height,y=void 0===m?"":m,b="";v&&(b+="width: ".concat(v,";")),y&&(b+="height: ".concat(y,";")),h+='<video poster="'.concat(a,'" controls="true" width="').concat(u,'" height="').concat(c,'" style="').concat(b,'"><source src="').concat(o,'" type="video/mp4"/></video>')}return h+="\n</div>"}};function _k(e){return void 0===e&&(e="r"),"".concat(e,"-").concat(Fm())}function Lk(e){var t={};return e.trim().split(";").forEach(function(e){if(e){var n=Lg(e.split(":"),2),r=n[0],o=n[1];r&&o&&(t[r.trim()]=o.trim())}}),t}function Mk(){return _k("w-e-insert-video")}var jk=function(){function e(){this.title=QE("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=Mk(),this.heightInputId=Mk(),this.buttonId=Mk()}return e.prototype.getSelectedVideoNode=function(e){return Iy.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=t.widthInputId,r=t.heightInputId,o=t.buttonId,i=Lg(cw(QE("videoModule.width"),n,"auto"),2),a=i[0],s=Zv(i[1]),u=Lg(cw(QE("videoModule.height"),r,"auto"),2),l=u[0],c=Zv(u[1]),d=Lg(fw(o,QE("videoModule.ok")),1)[0],f=this.getSelectedVideoNode(e);if(null==this.$content){var p=Zv("<div></div>");p.on("click","#".concat(o),function(t){t.preventDefault();var o=p.find("#".concat(n)).val().trim(),i=p.find("#".concat(r)).val().trim(),a=function(e){return/^\d+(\.\d+)?%$/.test(e)},s=function(e){return/^\d+(\.\d+)?$/.test(e)},u="auto",l="auto";a(o)?u=o:s(o)&&(u="".concat(parseInt(o,10),"px")),a(i)?l=i:s(i)&&(l="".concat(parseInt(i,10),"px"));var c=f.style,d=void 0===c?{}:c;e.restoreSelection();var h={style:Ig(Ig({},d),{width:u,height:l})};Wh.setNodes(e,h,{match:function(e){return Iy.checkNodeType(e,"video")}}),e.hidePanelOrModal()}),this.$content=p}var h=this.$content;if(h.empty(),h.append(a),h.append(l),h.append(d),null==f)return h[0];var g=f.style,v=void 0===g?{}:g,m=v.width,y=void 0===m?"":m,b=v.height,E=void 0===b?"":b;return s.val(y),c.val(E),setTimeout(function(){s.focus()}),h[0]},e}();function Hk(){return _k("w-e-edit-video")}var zk=function(){function e(){this.title=QE("videoModule.edit"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=Hk(),this.posterInputId=Hk(),this.buttonId=Hk()}return e.prototype.getSelectedVideoNode=function(e){return Iy.getSelectedNodeByType(e,"video")},e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){return null==e.selection||null==this.getSelectedVideoNode(e)},e.prototype.getModalPositionNode=function(e){return this.getSelectedVideoNode(e)},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.posterInputId,i=n.buttonId,a=Lg(cw(QE("videoModule.videoSrc"),r,QE("videoModule.videoSrcPlaceHolder")),2),s=a[0],u=a[1],l=Lg(cw(QE("videoModule.videoPoster"),o,QE("videoModule.videoPosterPlaceHolder")),2),c=l[0],d=l[1],f=Zv(u),p=Zv(d),h=Lg(fw(i,QE("videoModule.ok")),1)[0];if(null==this.$content){var g=Zv("<div></div>");g.on("click","#".concat(i),function(n){return Pg(t,void 0,void 0,function(){var t,i,a,s;return Rg(this,function(u){return n.preventDefault(),t=g.find("#".concat(r)).val().trim(),i=g.find("#".concat(o)).val().trim(),a=_k("video-"),s={src:t,poster:i,key:a},e.restoreSelection(),Wh.setNodes(e,s,{match:function(e){return Iy.checkNodeType(e,"video")}}),e.hidePanelOrModal(),[2]})})}),this.$content=g}var v=this.$content;v.empty(),v.append(s),v.append(c),v.append(h);var m=this.getSelectedVideoNode(e);if(null==m)return v[0];var y=m.src,b=void 0===y?"":y,E=m.poster,w=void 0===E?"":E;return f.val(b),p.val(w),setTimeout(function(){f.focus()}),v[0]},e}();function $k(e,t){return Pg(this,arguments,void 0,function(e,t,n,r,o){var i,a,s,u,l,c,d;return void 0===n&&(n=""),void 0===r&&(r=""),void 0===o&&(o=""),Rg(this,function(f){switch(f.label){case 0:return t?(e.restoreSelection(),i=e.getMenuConfig("insertVideo"),a=i.onInsertedVideo,s=i.checkVideo,u=i.parseVideoSrc,[4,s(t,n)]):[2];case 1:return"string"==typeof(l=f.sent())?(e.alert(l,"error"),[2]):null==l?[2]:[4,u(t)];case 2:return 0!==(c=f.sent()).trim().indexOf("<iframe ")&&(c=function(e){return e.replace(/</g,"<").replace(/>/g,">")}(c)),d={type:"video",src:c,poster:n,children:[{text:""}],style:{width:r,height:o}},Promise.resolve().then(function(){Iy.isSelectedEmptyParagraph(e)&&Wh.removeNodes(e,{mode:"highest"}),Wh.insertNodes(e,d,{mode:"highest"})}),a(d),[2]}})})}function Uk(){return _k("w-e-insert-video")}var Vk=function(){function e(){this.title=QE("videoModule.insertVideo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.srcInputId=Uk(),this.posterInputId=Uk(),this.buttonId=Uk()}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Bp.isCollapsed(t)||!!Iy.getSelectedElems(e).some(function(t){var n=Iy.getNodeType(t);return"pre"===n||("list-item"===n||!!e.isVoid(t))}))},e.prototype.getModalPositionNode=function(e){return null},e.prototype.getModalContentElem=function(e){var t=this,n=this,r=n.srcInputId,o=n.posterInputId,i=n.buttonId,a=Lg(cw(QE("videoModule.videoSrc"),r,QE("videoModule.videoSrcPlaceHolder")),2),s=a[0],u=a[1],l=Lg(cw(QE("videoModule.videoPoster"),o,QE("videoModule.videoPosterPlaceHolder")),2),c=l[0],d=l[1],f=Zv(u),p=Zv(d),h=Lg(fw(i,QE("videoModule.ok")),1)[0];if(null==this.$content){var g=Zv("<div></div>");g.on("click","#".concat(i),function(n){return Pg(t,void 0,void 0,function(){var t,i;return Rg(this,function(a){switch(a.label){case 0:return n.preventDefault(),t=g.find("#".concat(r)).val().trim(),i=g.find("#".concat(o)).val().trim(),[4,$k(e,t,i)];case 1:return a.sent(),e.hidePanelOrModal(),[2]}})})}),this.$content=g}var v=this.$content;return v.empty(),v.append(s),v.append(c),v.append(h),f.val(""),p.val(""),setTimeout(function(){f.focus()}),v[0]},e}();function Wk(e){return e.getMenuConfig("uploadVideo")}var Gk=new WeakMap;function qk(e,t){return Pg(this,void 0,void 0,function(){var n,r;return Rg(this,function(o){switch(o.label){case 0:return n=function(e){var t=Gk.get(e);if(null!=t)return t;var n=Wk(e),r=n.onSuccess,o=n.onProgress,i=n.onFailed,a=n.customInsert,s=n.onError;return t=KS(Ig(Ig({},n),{onProgress:function(t){e.showProgressBar(t),o&&o(t)},onSuccess:function(t,n){if(a)return a(n,function(t,n){return $k(e,t,n)}),void r(t,n);var o=n.errno,s=void 0===o?1:o,u=n.data,l=void 0===u?{}:u;if(0===s){var c=l.url,d=void 0===c?"":c,f=l.poster;$k(e,d,void 0===f?"":f),r(t,n)}else i(t,n)},onError:function(e,t,n){s(e,t,n)}})),Gk.set(e,t),t}(e),r=t.map(function(e){return{name:e.name,type:e.type,size:e.size,data:e}}),n.addFiles(r),[4,n.upload()];case 1:return o.sent(),[2]}})})}var Kk=function(){function e(){this.title=QE("videoModule.uploadVideo"),this.iconSvg='<svg viewBox="0 0 1056 1024"><path d="M805.902261 521.819882a251.441452 251.441452 0 0 0-251.011972 246.600033 251.051015 251.051015 0 1 0 502.023944 8.823877 253.237463 253.237463 0 0 0-251.011972-255.42391z m59.463561 240.001647v129.898403h-116.701631v-129.898403h-44.041298l101.279368-103.504859 101.279368 103.504859z" p-id="6802"></path><path d="M788.254507 0.000781H99.094092A98.663439 98.663439 0 0 0 0.001171 99.093701v590.067495a98.663439 98.663439 0 0 0 99.092921 99.092921h411.7549a266.434235 266.434235 0 0 1-2.186448-41.815807 275.843767 275.843767 0 0 1 275.180024-270.729042 270.650955 270.650955 0 0 1 103.504859 19.834201V99.093701A101.51363 101.51363 0 0 0 788.254507 0.000781zM295.054441 640.747004V147.507894l394.146189 246.600033z"></path></svg>',this.tag="button"}return e.prototype.getValue=function(e){return""},e.prototype.isActive=function(e){return!1},e.prototype.exec=function(e,t){var n=this.getMenuConfig(e),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i(function(t,n){return $k(e,t,n)});else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var s=Zv("body"),u=Zv('<input type="file" '.concat(a," multiple/>"));u.hide(),s.append(u),u.click(),u.on("change",function(){var t=u[0].files;!function(e,t){Pg(this,void 0,void 0,function(){var n,r,o,i,a,s,u,l,c,d,f,p;return Rg(this,function(h){switch(h.label){case 0:if(null==t)return[2];n=Array.prototype.slice.call(t),r=[],o=Wk(e).customUpload,h.label=1;case 1:h.trys.push([1,8,9,14]),i=!0,a=jg(n),h.label=2;case 2:return[4,a.next()];case 3:return s=h.sent(),(c=s.done)?[3,7]:(p=s.value,i=!1,u=p,o?[4,o(u,function(t,n){return $k(e,t,n)},e)]:[3,5]);case 4:return h.sent(),[3,6];case 5:r.push(u),h.label=6;case 6:return i=!0,[3,2];case 7:return[3,14];case 8:return l=h.sent(),d={error:l},[3,14];case 9:return h.trys.push([9,,12,13]),i||c||!(f=a.return)?[3,11]:[4,f.call(a)];case 10:h.sent(),h.label=11;case 11:return[3,13];case 12:if(d)throw d.error;return[7];case 13:return[7];case 14:return r.length>0?[4,qk(e,r)]:[3,16];case 15:h.sent(),h.label=16;case 16:return[2]}})})}(e,t)})}},e.prototype.isDisabled=function(e){var t=e.selection;return null==t||(!Bp.isCollapsed(t)||!!Iy.getSelectedElems(e).some(function(t){var n=Iy.getNodeType(t);return"pre"===n||("list-item"===n||!!e.isVoid(t))}))},e.prototype.getMenuConfig=function(e){return e.getMenuConfig("uploadVideo")},e}();function Yk(e,t,n,r,o,i){return void 0===t&&(t=""),void 0===n&&(n="auto"),void 0===r&&(r="auto"),void 0===o&&(o={}),void 0===i&&(i="center"),{type:"video",src:e,poster:t,width:n,height:r,style:o,children:[{text:""}],textAlign:i}}var Xk={selector:'div[data-w-e-type="video"]',parseElemHtml:function(e,t,n){var r=Zv(e),o="",i="",a="auto",s="auto",u={},l=r.find("iframe");if(l.length>0)return a=l.attr("width")||"auto",s=l.attr("height")||"auto",u=Lk(u=l.attr("style")||""),Yk(o=l[0].outerHTML,i,a,s,u,Lk(r.attr("style")||"")["text-align"]||"center");var c=r.find("video");return(o=c.attr("src")||"")||c.length>0&&(o=c.find("source").attr("src")||""),a=c.attr("width")||"auto",s=c.attr("height")||"auto",Yk(o,i=c.attr("poster")||"",a,s,u=Lk(u=c.attr("style")||""),Lk(r.attr("style")||"")["text-align"]||"center")}};var Zk={selector:"iframe,video,p",preParseHtml:function(e){var t=Zv(e),n=t;if("p"===Ik(t)){var r=t.children();if(1===r.length){var o=r[0],i=o.tagName.toLowerCase();["iframe","video"].includes(i)&&(n=Zv(o))}}var a=Ik(n);if("iframe"!==a&&"video"!==a)return n[0];if("video"===n.parent().attr("data-w-e-type"))return n[0];var s=Zv('<div data-w-e-type="video" data-w-e-is-void style="text-align: center;"></div>');return s.append(n),s[0]}};var Jk={type:"video",renderElem:function(e,t,n){var r,o=e,i=o.src,a=void 0===i?"":i,s=o.poster,u=void 0===s?"":s,l=o.key,c=void 0===l?"":l,d=o.width,f=void 0===d?"auto":d,p=o.height,h=void 0===p?"auto":p,g=o.style,v=void 0===g?{}:g,m=o.textAlign,y=void 0===m?"center":m,b=Iy.isNodeSelected(n,e);if(0===a.trim().indexOf("<iframe ")){r=BC("div",{className:"w-e-textarea-video-container","data-selected":b?"true":"",style:{textAlign:y},innerHTML:Pk(a,f,h,v)})}else{var E=BC("video",{key:c,poster:u,controls:!0,style:v},BC("source",{src:a,type:"video/mp4"}),"Sorry, your browser doesn't support embedded videos.\n 抱歉,浏览器不支持 video 视频");"auto"!==f&&(E.data.width=f),"auto"!==h&&(E.data.height=h),r=BC("div",{className:"w-e-textarea-video-container","data-selected":b?"true":"",style:{textAlign:y}},E)}var w=lC("div",{props:{contentEditable:!1},on:{mousedown:function(e){return e.preventDefault()}}},r);return w}},Qk={renderElems:[Jk],elemsToHtml:[Rk],preParseHtml:[Zk],parseElemsHtml:[Xk],menus:[{key:"insertVideo",factory:function(){return new Vk},config:{onInsertedVideo:function(e){},checkVideo:function(e,t){return!0},parseVideoSrc:function(e){return e}}},{key:"uploadVideo",factory:function(){return new Kk},config:{server:"",fieldName:"wangeditor-uploaded-video",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["video/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,onBeforeUpload:function(e){return e},onProgress:function(e){},onSuccess:function(e,t){},onFailed:function(e,t){console.error("'".concat(e.name,"' upload failed"),t)},onError:function(e,t,n){console.error("'".concat(e.name," upload error"),t,n)}}},{key:"editVideoSize",factory:function(){return new jk}},{key:"editVideoSrc",factory:function(){return new zk}}],editorPlugin:function(e){var t=e.isVoid,n=e.normalizeNode,r=e;return r.isVoid=function(e){return"video"===e.type||t(e)},r.normalizeNode=function(e){var t=Lg(e,2),o=t[0],i=t[1];"video"===Iy.getNodeType(o)&&(Iy.isLastNode(r,o)&&Wh.insertNodes(r,Iy.genEmptyParagraph(),{at:[i[0]+1]}));return n([o,i])},r}},eF=function(){function e(){throw new Error("不能实例化\nCan not construct a instance")}return e.setEditorConfig=function(e){void 0===e&&(e={}),this.editorConfig=Ig(Ig({},this.editorConfig),e)},e.setSimpleEditorConfig=function(e){void 0===e&&(e={}),this.simpleEditorConfig=Ig(Ig({},this.simpleEditorConfig),e)},e.setToolbarConfig=function(e){void 0===e&&(e={}),this.toolbarConfig=Ig(Ig({},this.toolbarConfig),e)},e.setSimpleToolbarConfig=function(e){void 0===e&&(e={}),this.simpleToolbarConfig=Ig(Ig({},this.simpleToolbarConfig),e)},e.registerPlugin=function(e){this.plugins.push(e)},e.registerMenu=function(e,t){lv(e,t)},e.registerRenderElem=function(e){var t,n,r;n=(t=e).type,r=t.renderElem,IC[n||""]=r},e.registerRenderStyle=function(e){!function(e){TC.push(e)}(e)},e.registerElemToHtml=function(e){!function(e){var t=e.type,n=e.elemToHtml;my[t||""]=n}(e)},e.registerStyleToHtml=function(e){!function(e){hy.push(e)}(e)},e.registerPreParseHtml=function(e){var t;t=e,ey.push(t)},e.registerParseElemHtml=function(e){!function(e){var t=e.selector,n=e.parseElemHtml;ny[t]=n}(e)},e.registerParseStyleHtml=function(e){!function(e){ty.push(e)}(e)},e.registerModule=function(e){tF(e)},e.editorConfig={},e.simpleEditorConfig={},e.toolbarConfig={},e.simpleToolbarConfig={},e.plugins=[],e}();function tF(e){var t=e.menus,n=e.renderElems,r=e.renderStyle,o=e.elemsToHtml,i=e.styleToHtml,a=e.preParseHtml,s=e.parseElemsHtml,u=e.parseStyleHtml,l=e.editorPlugin;t&&t.forEach(function(e){return eF.registerMenu(e)}),n&&n.forEach(function(e){return eF.registerRenderElem(e)}),r&&eF.registerRenderStyle(r),o&&o.forEach(function(e){return eF.registerElemToHtml(e)}),i&&eF.registerStyleToHtml(i),a&&a.forEach(function(e){return eF.registerPreParseHtml(e)}),s&&s.forEach(function(e){return eF.registerParseElemHtml(e)}),u&&eF.registerParseStyleHtml(u),l&&eF.registerPlugin(l)}CB.forEach(function(e){return tF(e)}),tF(rT),tF(Sk),tF(Qk),tF(Fk),tF(HB);var nF='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>';var rF={link:{menuKeys:["editLink","unLink","viewLink"]},image:{menuKeys:["imageWidth30","imageWidth50","imageWidth100","editorImageSizeMenu","editImage","viewImageLink","deleteImage"]},pre:{menuKeys:["enter","codeBlock","codeSelectLang"]},table:{menuKeys:["enter","tableHeader","tableFullWidth","insertTableRow","deleteTableRow","insertTableCol","deleteTableCol","deleteTable","mergeTableCell","splitTableCell","setTableProperty","setTableCellProperty"]},divider:{menuKeys:["enter"]},video:{menuKeys:["enter","editVideoSize","editVideoSrc"]}};var oF={hoverbarKeys:Ig(Ig({},rF),{text:{menuKeys:["formatPainter","headerSelect","insertLink","bulletedList","|","bold","through","color","bgColor","clearStyle"]}})};eF.setEditorConfig(Ig(Ig({},oF),{decorate:_B}));var iF={hoverbarKeys:rF};eF.setSimpleEditorConfig(Ig(Ig({},iF),{decorate:_B}));var aF={toolbarKeys:["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:QE("editor.more"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList","todo",{key:"group-justify",title:QE("editor.justify"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:QE("editor.indent"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',menuKeys:["indent","delIndent"]},"|","emotion","insertLink",{key:"group-image",title:QE("editor.image"),iconSvg:nF,menuKeys:["insertImage","uploadImage"]},{key:"group-video",title:QE("editor.video"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',menuKeys:["insertVideo","uploadVideo"]},"insertTable","codeBlock","divider","|","undo","redo","|","formatPainter","fullScreen"]};eF.setToolbarConfig(aF);var sF={toolbarKeys:["blockquote","header1","header2","header3","|","bold","underline","italic","through","color","bgColor","clearStyle","|","bulletedList","numberedList","todo","justifyLeft","justifyRight","justifyCenter","|","insertLink",{key:"group-image",title:QE("editor.image"),iconSvg:nF,menuKeys:["insertImage","uploadImage"]},"insertVideo","insertTable","codeBlock","|","undo","redo","|","fullScreen"]};function uF(e){void 0===e&&(e={});var t=e.selector,n=void 0===t?"":t,r=e.content,o=void 0===r?[]:r,i=e.html,a=e.config,s=void 0===a?{}:a,u=e.mode,l="simple"===(void 0===u?"default":u)?eF.simpleEditorConfig:eF.editorConfig,c=Ig(Ig({},l.hoverbarKeys||{}),s.hoverbarKeys||{});return KC({selector:n,config:Ig(Ig(Ig({},l),s),{hoverbarKeys:c}),content:o,html:i,plugins:eF.plugins})}function lF(e){var t=e.selector,n=e.editor,r=e.config,o=void 0===r?{}:r,i=e.mode,a=void 0===i?"default":i;if(!t)throw new Error("Cannot find 'selector' when create toolbar");var s="simple"===a?eF.simpleToolbarConfig:eF.toolbarConfig;return XC(n,{selector:t,config:Ig(Ig({},s),o)})}eF.setSimpleToolbarConfig(sF);var cF={};export{eF as Boot,Iy as DomEditor,mh as SlateEditor,kp as SlateElement,yh as SlateLocation,_p as SlateNode,Cp as SlatePath,wh as SlatePoint,Bp as SlateRange,Nh as SlateText,Wh as SlateTransforms,YC as Toolbar,uF as createEditor,lF as createToolbar,KS as createUploader,cF as default,fw as genModalButtonElems,cw as genModalInputElems,dw as genModalTextareaElems,YE as i18nAddResources,XE as i18nChangeLanguage,ZE as i18nGetResources,QE as t};
|
|
21
21
|
//# sourceMappingURL=index.mjs.map
|